relevance_table

Functions

_prepare_df(df, df_exog, segment, regressors)

Drop nan values from dataframes for the segment.

get_model_relevance_table(df, df_exog, model)

Calculate relevance table with feature importance from model.

get_statistics_relevance_table(df, df_exog)

Calculate relevance table with p-values from tsfresh.

get_model_relevance_table(df: pandas.core.frame.DataFrame, df_exog: pandas.core.frame.DataFrame, model: Union[sklearn.tree._classes.DecisionTreeRegressor, sklearn.tree._classes.ExtraTreeRegressor, sklearn.ensemble._forest.RandomForestRegressor, sklearn.ensemble._forest.ExtraTreesRegressor, sklearn.ensemble._gb.GradientBoostingRegressor, catboost.core.CatBoostRegressor]) pandas.core.frame.DataFrame[source]

Calculate relevance table with feature importance from model.

Parameters
Returns

dataframe with feature importance values.

Return type

pd.DataFrame

get_statistics_relevance_table(df: pandas.core.frame.DataFrame, df_exog: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]

Calculate relevance table with p-values from tsfresh.

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

  • df_exog (pandas.core.frame.DataFrame) – dataframe with exogenous data

Returns

dataframe with p-values.

Return type

pd.DataFrame

Notes

Time complexity of this method is \(O(n\_segments * n\_features * history\_len)\)