HistGradientBoostingRegressor

class falcon.tabular.models.HistGradientBoostingRegressor(max_iter: int = 100, min_samples_leaf: int = 20, learning_rate: float = 0.1, l2_regularization: float = 0.0, random_seed: int = 42, **kwargs: Any)

Wrapper around sklearn.ensemble.HistGradientBoostingRegressor.

__init__(max_iter: int = 100, min_samples_leaf: int = 20, learning_rate: float = 0.1, l2_regularization: float = 0.0, random_seed: int = 42, **kwargs: Any)
Parameters
  • max_iter (int, optional) – number of decision trees, by default 100

  • min_samples_leaf (int, optional) – minimum number of samples per leaf, by default 20

  • learning_rate (float, optional) – learning rate, by default 0.1

  • l2_regularization (float, optional) – L2 regularization parameter, by default 0.0

  • random_seed (int, optional) – by default 42

fit(X: ndarray[Any, dtype[float32]], y: ndarray[Any, dtype[float32]], *args: Any, **kwargs: Any) None

Fits the model

Parameters
  • X (Float32Array) – Features

  • y (Float32Array) – targets

classmethod get_search_space(X: ndarray[Any, dtype[ScalarType]], y: ndarray[Any, dtype[ScalarType]]) Union[Callable, Dict]

A class method that provides an optuna search space for the model. Optionally, the search space can be adjusted based on the provided training data.

Parameters
  • X (Any) – features

  • y (Any) – targets

Returns

dictionary that describes the search space, or custom objective function

Return type

Union[Callable, Dict]

predict(X: ndarray[Any, dtype[ScalarType]], *args: Any, **kwargs: Any) ndarray[Any, dtype[ScalarType]]
Parameters

X (npt.NDArray) – features

Returns

predictions

Return type

npt.NDArray

to_onnx() SerializedModelRepr

Serializes the model to onnx.

Return type

SerializedModelRepr