{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/decomposition/tsne/v1/schema.json",
  "title": "rtemis tSNEConfig",
  "description": "t-Distributed Stochastic Neighbor Embedding. See setup_tSNE.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "k": {
      "type": "integer",
      "minimum": 1,
      "default": 2,
      "description": "Number of components to extract."
    },
    "initial_dims": {
      "type": "integer",
      "minimum": 1,
      "default": 50,
      "description": "Initial dimensions."
    },
    "perplexity": {
      "type": "number",
      "minimum": 0,
      "default": 30,
      "description": "Perplexity."
    },
    "theta": {
      "type": "number",
      "minimum": 0,
      "maximum": 1,
      "default": 0.5,
      "description": "Speed/accuracy trade-off."
    },
    "check_duplicates": {
      "type": "boolean",
      "default": true,
      "description": "Check for duplicates."
    },
    "pca": {
      "type": "boolean",
      "default": true,
      "description": "Perform an initial PCA step."
    },
    "partial_pca": {
      "type": "boolean",
      "default": false,
      "description": "Use truncated PCA (irlba)."
    },
    "max_iter": {
      "type": "integer",
      "minimum": 1,
      "default": 1000,
      "description": "Maximum number of iterations."
    },
    "verbose": {
      "type": "boolean",
      "default": false,
      "description": "Print progress."
    },
    "is_distance": {
      "type": "boolean",
      "default": false,
      "description": "Treat the input as a distance matrix."
    },
    "pca_center": {
      "type": "boolean",
      "default": true,
      "description": "Center before the PCA step."
    },
    "pca_scale": {
      "type": "boolean",
      "default": false,
      "description": "Scale before the PCA step."
    },
    "normalize": {
      "type": "boolean",
      "default": true,
      "description": "Normalize the input."
    },
    "stop_lying_iter": {
      "type": "integer",
      "minimum": 0,
      "default": 250,
      "description": "Iteration after which exaggeration stops."
    },
    "mom_switch_iter": {
      "type": "integer",
      "minimum": 0,
      "default": 250,
      "description": "Iteration at which momentum switches."
    },
    "momentum": {
      "type": "number",
      "default": 0.5,
      "description": "Initial momentum."
    },
    "final_momentum": {
      "type": "number",
      "default": 0.8,
      "description": "Momentum used later in optimization."
    },
    "eta": {
      "type": "number",
      "default": 200,
      "description": "Learning rate."
    },
    "exaggeration_factor": {
      "type": "number",
      "default": 12,
      "description": "Early-exaggeration factor."
    },
    "num_threads": {
      "type": "integer",
      "minimum": 0,
      "default": 1,
      "description": "Number of threads (0 = all cores)."
    },
    "Y_init": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "minItems": 1
          },
          "minItems": 1
        }
      ],
      "$comment": "Data-dependent: initial embedding matrix, rows = cases, columns = output dimensions.",
      "description": "Optional initial Y (embedding) matrix. null = random initialization."
    }
  }
}
