TimeSeriesTransformer class

Definition

Class for timeseries preprocess.

TimeSeriesTransformer(pipeline_type: azureml.automl.runtime.featurizer.transformer.timeseries.timeseries_transformer.TimeSeriesPipelineType = <TimeSeriesPipelineType.FULL: 1>, featurization_config: typing.Union[azureml.automl.core.featurization.featurizationconfig.FeaturizationConfig, NoneType] = None, **kwargs: typing.Any) -> None
Inheritance
sklearn.base.BaseEstimator
TimeSeriesTransformer
TimeSeriesTransformer

Methods

add_dummy_order_column(X: pandas.core.frame.DataFrame) -> None

Add the dummy order column to the pandas data frame.

construct_tsdf(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None) -> azureml.automl.runtime.shared.time_series_data_frame.TimeSeriesDataFrame

Contruct timeseries dataframe.

fit

The fit method to fit the transform.

fit_transform(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None, **fit_params: typing.Any) -> pandas.core.frame.DataFrame

Wrap fit and transform functions in the Data transformer class.

get_auto_lag() -> typing.Union[typing.List[int], NoneType]

Return the heuristically inferred lag.

If lags were not defined as auto, return None. ClientException is raised if fit was not called. :return: Heuristically defined target lag or None. :raises: ClientException

get_auto_max_horizon() -> typing.Union[int, NoneType]

Return auto max horizon.

If max_horizon was not defined as auto, return None. :return: Heuristically defined max_horizon or None. :raises: ClientException

get_auto_window_size() -> typing.Union[int, NoneType]

Return the auto rolling window size.

If rolling window was not defined as auto, return None. ClientException is raised if fit was not called. :return: Heuristically defined rolling window size or None. :raises: ClientException

get_engineered_feature_names() -> typing.Union[typing.List[str], NoneType]

Get the transformed column names.

get_featurization_summary() -> typing.List[typing.Dict[str, typing.Union[typing.Any, NoneType]]]

Return the featurization summary for all the input features seen by TimeSeriesTransformer.

get_json_strs_for_engineered_feature_names(engi_feature_name_list: typing.Union[typing.List[str], NoneType] = None) -> typing.List[str]

Return JSON string list for engineered feature names.

get_target_lags() -> typing.List[int]

Return target lags if any.

get_target_rolling_window_size() -> int

Return the size of rolling window.

transform(df: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None) -> pandas.core.frame.DataFrame

Transform the input raw data with the transformations identified in fit stage.

add_dummy_order_column(X: pandas.core.frame.DataFrame) -> None

Add the dummy order column to the pandas data frame.

add_dummy_order_column(X: pandas.core.frame.DataFrame) -> None

Parameters

X

The data frame which will undergo order column addition.

construct_tsdf(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None) -> azureml.automl.runtime.shared.time_series_data_frame.TimeSeriesDataFrame

Contruct timeseries dataframe.

construct_tsdf(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None) -> azureml.automl.runtime.shared.time_series_data_frame.TimeSeriesDataFrame

fit

The fit method to fit the transform.

Parameters

X

Dataframe representing text, numerical or categorical input.

y

To match fit signature.

Returns

DataTransform object.

fit_transform(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None, **fit_params: typing.Any) -> pandas.core.frame.DataFrame

Wrap fit and transform functions in the Data transformer class.

fit_transform(X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None, **fit_params: typing.Any) -> pandas.core.frame.DataFrame

Parameters

X
ndarray or DataFrame

Dataframe representing text, numerical or categorical input.

y
ndarray or DataFrame

To match fit signature.

Returns

Transformed data.

get_auto_lag() -> typing.Union[typing.List[int], NoneType]

Return the heuristically inferred lag.

If lags were not defined as auto, return None. ClientException is raised if fit was not called. :return: Heuristically defined target lag or None. :raises: ClientException

get_auto_lag() -> typing.Union[typing.List[int], NoneType]

get_auto_max_horizon() -> typing.Union[int, NoneType]

Return auto max horizon.

If max_horizon was not defined as auto, return None. :return: Heuristically defined max_horizon or None. :raises: ClientException

get_auto_max_horizon() -> typing.Union[int, NoneType]

get_auto_window_size() -> typing.Union[int, NoneType]

Return the auto rolling window size.

If rolling window was not defined as auto, return None. ClientException is raised if fit was not called. :return: Heuristically defined rolling window size or None. :raises: ClientException

get_auto_window_size() -> typing.Union[int, NoneType]

get_engineered_feature_names() -> typing.Union[typing.List[str], NoneType]

Get the transformed column names.

get_engineered_feature_names() -> typing.Union[typing.List[str], NoneType]

Returns

list of strings

get_featurization_summary() -> typing.List[typing.Dict[str, typing.Union[typing.Any, NoneType]]]

Return the featurization summary for all the input features seen by TimeSeriesTransformer.

get_featurization_summary() -> typing.List[typing.Dict[str, typing.Union[typing.Any, NoneType]]]

Returns

List of featurization summary for each input feature.

get_json_strs_for_engineered_feature_names(engi_feature_name_list: typing.Union[typing.List[str], NoneType] = None) -> typing.List[str]

Return JSON string list for engineered feature names.

get_json_strs_for_engineered_feature_names(engi_feature_name_list: typing.Union[typing.List[str], NoneType] = None) -> typing.List[str]

Parameters

engi_feature_name_list

Engineered feature names for whom JSON strings are required

Returns

JSON string list for engineered feature names

get_target_lags() -> typing.List[int]

Return target lags if any.

get_target_lags() -> typing.List[int]

get_target_rolling_window_size() -> int

Return the size of rolling window.

get_target_rolling_window_size() -> int

transform(df: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None) -> pandas.core.frame.DataFrame

Transform the input raw data with the transformations identified in fit stage.

transform(df: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow], y: typing.Union[numpy.ndarray, pandas.core.series.Series, pandas.core.arrays.categorical.Categorical, azureml.dataprep.api.dataflow.Dataflow, NoneType] = None) -> pandas.core.frame.DataFrame

Parameters

df
DataFrame

Dataframe representing text, numerical or categorical input.

y
ndarray

To match fit signature.

Returns

pandas.DataFrame

Attributes

columns

Return the list of expected columns.

Returns

The list of columns.

Return type

lookback_features_removed

Returned true if lookback features were removed due to memory limitations.

max_horizon

Return the max horizon.

parameters

Return the parameters needed to reconstruct the time series transformer

y_imputers

Return the imputer for target column.

Returns

imputer for target column.

Return type

MISSING_Y

MISSING_Y = 'missing_y'

REMOVE_LAG_LEAD_WARN

REMOVE_LAG_LEAD_WARN = 'The lag-lead operator was removed due to memory limitation.'

REMOVE_ROLLING_WINDOW_WARN

REMOVE_ROLLING_WINDOW_WARN = 'The rolling window operator was removed due to memory limitation.'