{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/supervised/v1/schema.json",
  "title": "rtemis SuperConfig",
  "description": "Language-independent config for an rtemis supervised-learning run. Mirrors the `SuperConfig` object: data references, optional preprocessing / decomposition, an algorithm with hyperparameters, optional tuning and outer resampling, and execution settings. The same config drives rtemis (R), rtemis-py, and rtemislive.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "const": "https://schema.rtemis.org/supervised/v1/schema.json",
      "description": "JSON Schema URI for this config instance."
    },
    "dat_training_path": {
      "type": ["string", "null"],
      "default": null,
      "description": "Path to the training data."
    },
    "dat_validation_path": {
      "type": ["string", "null"],
      "default": null,
      "description": "Path to the validation data."
    },
    "dat_test_path": {
      "type": ["string", "null"],
      "default": null,
      "description": "Path to the held-out test data."
    },
    "weights": {
      "type": ["string", "null"],
      "default": null,
      "description": "Name of the column to use as case weights."
    },
    "positive_class": {
      "type": ["string", "null"],
      "default": null,
      "description": "Outcome level to treat as positive (binary classification)."
    },
    "preprocessor_config": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "https://schema.rtemis.org/preprocessor/v1/schema.json"
        }
      ]
    },
    "decomposition_config": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "https://schema.rtemis.org/decomposition/v1/schema.json"
        }
      ]
    },
    "algorithm": {
      "type": ["string", "null"],
      "default": null,
      "description": "Supervised-learning algorithm name."
    },
    "hyperparameters": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "https://schema.rtemis.org/hyperparameters/v1/schema.json"
        }
      ]
    },
    "tuner_config": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "https://schema.rtemis.org/tuner/v1/schema.json"
        }
      ]
    },
    "outer_resampling_config": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "https://schema.rtemis.org/resampler/v1/schema.json"
        }
      ]
    },
    "execution_config": {
      "$ref": "https://schema.rtemis.org/execution/v1/schema.json"
    },
    "question": {
      "type": ["string", "null"],
      "default": null,
      "description": "User-provided label / question for the run."
    },
    "outdir": {
      "type": "string",
      "default": "results/",
      "description": "Output directory for results."
    },
    "verbosity": {
      "type": "integer",
      "minimum": 0,
      "default": 1,
      "description": "Verbosity level."
    }
  }
}
