{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.rtemis.org/hyperparameters/monotonichal/v1/schema.json",
  "title": "rtemis MonotonicHALHyperparameters",
  "description": "Monotonic Highly Adaptive Lasso (hal9001). See `setup_MonotonicHAL`.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "smoothness_orders": {
      "oneOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 1
        },
        {
          "type": "object",
          "properties": {
            "candidates": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              },
              "minItems": 2,
              "description": "Values to tune over; the tuner selects one."
            }
          },
          "required": ["candidates"],
          "additionalProperties": false
        }
      ],
      "description": "Smoothness of the basis functions: 0 fits zero-order indicators and yields a step function, 1 fits piecewise linear splines and yields a continuous one.",
      "x-rtemis": {
        "type": "integer",
        "tunable": true
      }
    },
    "num_knots": {
      "type": ["integer", "null"],
      "minimum": 1,
      "description": "Number of knots spanning each feature. NULL generates them from smoothness_orders.",
      "x-rtemis": {
        "type": "integer"
      }
    },
    "reduce_basis": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "type": "number",
          "maximum": 1,
          "exclusiveMinimum": 0
        },
        {
          "type": "object",
          "properties": {
            "candidates": {
              "type": "array",
              "items": {
                "type": "number",
                "maximum": 1,
                "exclusiveMinimum": 0
              },
              "minItems": 2,
              "description": "Values to tune over; the tuner selects one."
            }
          },
          "required": ["candidates"],
          "additionalProperties": false
        }
      ],
      "description": "Minimum proportion of cases a basis function must be non-zero in to be kept. NULL uses the backend default of 1/sqrt(n). Applies only when smoothness_orders is 0.",
      "x-rtemis": {
        "type": "number",
        "tunable": true,
        "applies_when": {
          "smoothness_orders": 0
        }
      }
    },
    "penalized": {
      "type": "boolean",
      "description": "Apply the lasso penalty to the basis functions. FALSE removes it, making the fit the non-parametric maximum likelihood estimate over the monotonic class.",
      "x-rtemis": {
        "type": "boolean"
      }
    },
    "cv_select": {
      "const": true,
      "description": "Select lambda by cross-validation inside the fit; determined by the class.",
      "x-rtemis": {
        "type": "boolean",
        "role": "constant"
      }
    },
    "use_min": {
      "type": "boolean",
      "description": "Select lambda.min from the internal cross-validation. FALSE selects the more heavily penalized lambda.1se.",
      "x-rtemis": {
        "type": "boolean"
      }
    },
    "nfolds": {
      "type": "integer",
      "minimum": 3,
      "description": "Number of folds of the internal cross-validation that selects lambda.",
      "x-rtemis": {
        "type": "integer"
      }
    },
    "seed": {
      "type": ["integer", "null"],
      "description": "Random seed for the internal cross-validation's fold assignment. NULL leaves it drawn from the ambient RNG.",
      "x-rtemis": {
        "type": "integer"
      }
    },
    "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
      }
    }
  }
}
