Skip to content

Instantly share code, notes, and snippets.

@alex-hse-repository
Last active June 3, 2022 08:18
Show Gist options
  • Save alex-hse-repository/182489df4c8ee5f9dee1d2298035e758 to your computer and use it in GitHub Desktop.
Save alex-hse-repository/182489df4c8ee5f9dee1d2298035e758 to your computer and use it in GitHub Desktop.
from etna.analysis import plot_feature_relevance, ModelRelevanceTable
from catboost import CatBoostRegressor
ts = get_ts(segments)
ts.fit_transform(transforms)
plot_feature_relevance(
ts=ts,
relevance_table=ModelRelevanceTable(),
relevance_aggregation_mode="mean",
relevance_params={
"model": CatBoostRegressor(
cat_features=["df_day_number_in_week", "df_day_number_in_month", "df_is_weekend", "segment_code"], verbose=0
)
},
top_k=10,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment