You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alex-hse-repository
changed the title
Make base class of Transforms work with TSDataset
[DRAFT]Make base class of Transforms work with TSDataset
Jul 14, 2022
🚀 Feature Request
We need to teach our transforms work with dataset instead of dataframe
Proposal
Transform
:Add method
get_regressors_info() ->
List[str]`Create method
update_dataset(ts: TSDataset, df: pd.DataFrame, df_transformed: pd.DataFrame)
update_columns_from_pandas
, if len(df.columns) <= len(df_transformed.columns)remove_columns
, if len(df.columns) > len(df_transformed.columns)get_regressors_info
to get the information about the regressors if necessaryCreate method
fit(self, ts: TSDataset)
:_fit(df: pd.DataFrame)
to_pandas
_fit
to fit the transform with this dataframeCreate method
transform(self, ts: TSDataset)
:_transform(df: pd.DataFrame)
to_pandas
_transform
to transform this dataframeupdate_dataset
to update the columns in the datasetCreate method
inverse_transform(self, ts: TSDataset)
:_inverse_transform(df: pd.DataFrame)
to_pandas
_inverse_transform
to transform this dataframeupdate_dataset
to update the columns in the datasetTSDataset
:self
instead ofself.df
The necessary columns are defined using the in_column attribute, added in #810
Test cases
update_dataset
works correctly in different cases(update_regressors + update columns)fit
,transform
,inverse_transform
logic using mocksAdditional context
Is blocked by #810
The text was updated successfully, but these errors were encountered: