{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/clustering/dbscan/v1/schema.json",
  "title": "rtemis DBSCANConfig",
  "description": "DBSCAN density-based clustering. See setup_DBSCAN.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "eps": {
      "type": "number",
      "exclusiveMinimum": 0,
      "default": 0.5,
      "description": "Radius of neighborhood."
    },
    "min_points": {
      "type": "integer",
      "minimum": 1,
      "default": 5,
      "description": "Minimum number of points in a neighborhood to form a cluster."
    },
    "border_points": {
      "type": "boolean",
      "default": true,
      "description": "Assign border points to clusters."
    },
    "search": {
      "type": "string",
      "enum": ["kdtree", "linear", "dist"],
      "default": "kdtree",
      "description": "Nearest neighbor search strategy."
    },
    "bucket_size": {
      "type": "integer",
      "minimum": 1,
      "default": 100,
      "description": "Size of buckets for the k-d tree search."
    },
    "split_rule": {
      "type": "string",
      "enum": ["SUGGEST", "STD", "MIDPT", "FAIR", "SL_MIDPT", "SL_FAIR"],
      "default": "SUGGEST",
      "description": "Rule for splitting the k-d tree."
    },
    "approx": {
      "type": "boolean",
      "default": false,
      "description": "Use approximate nearest neighbor search."
    },
    "weights": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "type": "number"
          },
          "minItems": 1
        }
      ],
      "$comment": "Data-dependent: per-point weights, length = number of points.",
      "description": "Optional weights for data points. null = unweighted."
    }
  }
}
