hpipy.extensions.RandomForestModel.fit#
- RandomForestModel.fit(dep_var=None, ind_var=None, estimator='pdp', log_dep=True, n_estimators=100, quantile=None, random_seed=0, **kwargs)[source]#
Fit the random forest model and generate index coefficients.
- Parameters:
dep_var (str | None, optional) – Dependent variable. Defaults to None.
ind_var (list[str] | None, optional) – Independent variable(s). Defaults to None.
estimator (str, optional) – Estimator type. Defaults to “pdp”.
log_dep (bool, optional) – Log transform the dependent variable. Defaults to True.
n_estimators (int, optional) – Number of estimators. Defaults to 100.
quantile (float | None, optional) – Quantile to compute. Defaults to None.
random_seed (int, optional) – Random seed to use. Defaults to 0.
kwargs (Any)
- Returns:
Fitted model.
- Return type:
Self