_CatBoostAdapter

class _CatBoostAdapter(iterations: Optional[int] = None, depth: Optional[int] = None, learning_rate: Optional[float] = None, logging_level: Optional[str] = 'Silent', l2_leaf_reg: Optional[float] = None, thread_count: Optional[int] = None, **kwargs)[source]

Bases: etna.models.base.BaseAdapter

Inherited-members

Parameters
  • iterations (Optional[int]) –

  • depth (Optional[int]) –

  • learning_rate (Optional[float]) –

  • logging_level (Optional[str]) –

  • l2_leaf_reg (Optional[float]) –

  • thread_count (Optional[int]) –

Methods

fit(df, regressors)

Fit Catboost model.

forecast_components(df)

Estimate forecast components.

get_model()

Get internal catboost.CatBoostRegressor model that is used inside etna class.

predict(df)

Compute predictions from a Catboost model.

predict_components(df)

Estimate prediction components.

fit(df: pandas.core.frame.DataFrame, regressors: List[str]) etna.models.catboost._CatBoostAdapter[source]

Fit Catboost model.

Parameters
  • df (pandas.core.frame.DataFrame) – Features dataframe

  • regressors (List[str]) – List of the columns with regressors(ignored in this model)

Returns

Fitted model

Return type

etna.models.catboost._CatBoostAdapter

forecast_components(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Estimate forecast components.

Parameters

df (pandas.core.frame.DataFrame) – features dataframe

Returns

dataframe with forecast components

Return type

pandas.core.frame.DataFrame

get_model() catboost.core.CatBoostRegressor[source]

Get internal catboost.CatBoostRegressor model that is used inside etna class.

Returns

Internal model

Return type

result

predict(df: pandas.core.frame.DataFrame) numpy.ndarray[source]

Compute predictions from a Catboost model.

Parameters

df (pandas.core.frame.DataFrame) – Features dataframe

Returns

Array with predictions

Return type

numpy.ndarray

predict_components(df: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Estimate prediction components.

Parameters

df (pandas.core.frame.DataFrame) – features dataframe

Returns

dataframe with prediction components

Return type

pandas.core.frame.DataFrame