{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/tuner/gridsearch/v1/schema.json",
  "title": "rtemis GridSearchConfig",
  "description": "Grid search over hyperparameter combinations. See setup_GridSearch.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "resampler_config": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "https://schema.rtemis.org/resampler/v1/schema.json"
        }
      ]
    },
    "search_type": {
      "type": "string",
      "enum": ["exhaustive", "randomized"],
      "default": "exhaustive",
      "description": "Grid search strategy."
    },
    "randomize_p": {
      "type": ["number", "null"],
      "exclusiveMinimum": 0,
      "exclusiveMaximum": 1,
      "default": null,
      "description": "Fraction of combinations to test when search_type is 'randomized'."
    },
    "metrics_aggregate_fn": {
      "type": "string",
      "default": "mean",
      "description": "Name of the function used to aggregate metrics across resamples."
    },
    "metric": {
      "type": ["string", "null"],
      "default": null,
      "description": "Metric to minimize or maximize. NULL = set from outcome type."
    },
    "maximize": {
      "type": ["boolean", "null"],
      "default": null,
      "description": "Maximize `metric` (otherwise minimize). NULL = set from the metric."
    }
  }
}
