{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/clustering/cmeans/v1/schema.json",
  "title": "rtemis CMeansConfig",
  "description": "Fuzzy c-means clustering. See setup_CMeans.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "k": {
      "type": "integer",
      "minimum": 1,
      "default": 2,
      "description": "Number of clusters."
    },
    "max_iter": {
      "type": "integer",
      "minimum": 1,
      "default": 100,
      "description": "Maximum number of iterations."
    },
    "dist": {
      "type": "string",
      "enum": ["euclidean", "manhattan"],
      "default": "euclidean",
      "description": "Distance measure."
    },
    "method": {
      "type": "string",
      "enum": ["cmeans", "ufcl"],
      "default": "cmeans",
      "description": "\"cmeans\" = fuzzy c-means; \"ufcl\" = on-line update."
    },
    "m": {
      "type": "number",
      "exclusiveMinimum": 1,
      "default": 2,
      "description": "Degree of fuzzification."
    },
    "rate_par": {
      "type": ["number", "null"],
      "minimum": 0,
      "maximum": 1,
      "default": null,
      "description": "Learning rate for the online (ufcl) variant."
    },
    "weights": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "array",
          "items": {
            "type": "number"
          },
          "minItems": 1
        }
      ],
      "default": 1,
      "$comment": "Data-dependent when a vector: per-case weights, length = number of cases.",
      "description": "Case weights: a single number applied to every case, or a per-case vector."
    },
    "control": {
      "type": "object",
      "description": "Control parameters passed to the clustering backend."
    }
  }
}
