{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/hyperparameters/superlearner/v1/schema.json",
  "title": "rtemis SuperLearnerHyperparameters",
  "description": "SuperLearner: cross-validated stacked ensemble. See `setup_SuperLearner`.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "base_learners": {
      "type": "array",
      "items": {
        "$ref": "https://schema.rtemis.org/hyperparameters/v1/schema.json"
      }
    },
    "inner_resampling_config": {
      "$ref": "https://schema.rtemis.org/resampler/v1/schema.json"
    },
    "expand_search_spaces": {
      "type": "boolean",
      "description": "Expand a base learner's search space into one library entry per grid combination, rather than tuning it by inner resampling.",
      "x-rtemis": {
        "type": "boolean"
      }
    },
    "ifw": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "properties": {
            "candidates": {
              "type": "array",
              "items": {
                "type": "boolean"
              },
              "minItems": 2,
              "description": "Values to tune over; the tuner selects one."
            }
          },
          "required": ["candidates"],
          "additionalProperties": false
        }
      ],
      "description": "Inverse Frequency Weighting in classification.",
      "x-rtemis": {
        "type": "boolean",
        "tunable": true
      }
    },
    "meta_learner": {
      "$ref": "https://schema.rtemis.org/hyperparameters/v1/schema.json"
    },
    "discrete": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "object",
          "properties": {
            "candidates": {
              "type": "array",
              "items": {
                "type": "boolean"
              },
              "minItems": 2,
              "description": "Values to tune over; the tuner selects one."
            }
          },
          "required": ["candidates"],
          "additionalProperties": false
        }
      ],
      "description": "Keep the single library entry with the lowest cross-validated risk rather than the weighted combination.",
      "x-rtemis": {
        "type": "boolean",
        "tunable": true
      }
    }
  }
}
