Replies: 1 comment 2 replies
-
I assume you are looking for what the data looks like after the preprocessing transforms are applied, as the underlying model would see the data? Ensembles can mess things up a bit because they mix together separate transformer+model groups, but generally: import json
from autots import GeneralTransformer, AutoTS
model = AutoTS(...your_args...).fit()
# Ensembles don't have one overall transformer, so we can't plot that
# but for horizontal with no style 1 ensembles we can still view the best non ensemble model transformer
if model.best_model_ensemble == 2:
params = json.loads(model.best_model_non_horizontal['TransformationParameters'].iloc[0])
else:
params = model.best_model_transformation_params
params = model.best_model_transformation_params
# if this is an empty dict, this means that best model and best non horizontal are both an Ensemble
# you could loop through the Ensemble params and plot each transformer, in that case, however, not shown
print(f"Transformer params are {params}")
transformer = GeneralTransformer(**params)
transformed_df = transformer.fit_transform(model.df_wide_numeric)
column = model.df_wide_numeric.columns[0]
plot_df = model.df_wide_numeric[column].to_frame().merge(transformed_df[column].to_frame().rename(columns=lambda x: "transformed_" + str(x)[0:50]), right_index=True, left_index=True)
plot_df.plot() # scale is often very different between two, because scaling
plot_df.iloc[:, -1].plot() # just the transformed
# plt.show() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone, great package.
Is it possible to see the transformed version of training data for timeseries? Is this feature available already in the package?
Beta Was this translation helpful? Give feedback.
All reactions