{
  "$id": "https://schema.rtemis.org/clustering/cmeans/v1/schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "rtemis CMeansConfig",
  "description": "Fuzzy c-means clustering.",
  "type": "object",
  "properties": {
    "k": {
      "description": "Number of clusters.",
      "type": "integer",
      "minimum": 1,
      "x-rtemis": {
        "type": "integer"
      }
    },
    "max_iter": {
      "description": "Maximum number of iterations.",
      "type": "integer",
      "minimum": 1,
      "x-rtemis": {
        "type": "integer"
      }
    },
    "dist": {
      "description": "Distance measure.",
      "type": "string",
      "enum": ["euclidean", "manhattan"],
      "x-rtemis": {
        "type": "string"
      }
    },
    "method": {
      "description": "\"cmeans\" = fuzzy c-means; \"ufcl\" = on-line update.",
      "type": "string",
      "enum": ["cmeans", "ufcl"],
      "x-rtemis": {
        "type": "string"
      }
    },
    "m": {
      "description": "Degree of fuzzification.",
      "type": "number",
      "exclusiveMinimum": 1,
      "x-rtemis": {
        "type": "number"
      }
    },
    "rate_par": {
      "description": "Learning rate for the online (ufcl) variant.",
      "type": ["number", "null"],
      "minimum": 0,
      "maximum": 1,
      "x-rtemis": {
        "type": "number"
      }
    },
    "weights": {
      "description": "Case weights: either a scalar, applied to every case, or a vector. A vector must have one value per case.",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "array",
          "items": {
            "type": "number"
          },
          "minItems": 1
        }
      ],
      "x-rtemis": {
        "type": "number",
        "container": "array",
        "broadcast": true,
        "data_bound": "n_cases",
        "data_dependent": true
      },
      "$comment": "Data-dependent: one value per case when given as a vector, so it cannot be filled in without the data."
    },
    "control": {
      "description": "Control parameters passed to the clustering backend.",
      "type": "object",
      "x-rtemis": {
        "type": "object"
      }
    }
  }
}
