Welcome to giotto-time’s API reference!

gtime.causality: Causality Tests

The gtime.causality module deals with the causality tests for time series data.


Test the shifted linear fit coefficients between two or more time series.


Class responsible for assessing the shifted Pearson correlations (PPMCC) between two or more series.

gtime.compose: Compose

The gtime.compose module contains meta-estimators for building composite models with transformers.

compose.FeatureCreation(transformers[, …])

Applies transformers to columns of a pandas DataFrame.

gtime.feature_extraction: Feature Extraction

The gtime.feature_extraction module deals with the creation of features starting from a time series.


Perform a shift of a DataFrame of size equal to shift.


For each row in time_series, compute the moving average of the previous window_size rows.


For each row in time_series, compute the moving custom function of the previous window_size rows.


Compute the polynomial feature_extraction, of a degree equal to the input degree.

feature_extraction.Exogenous(…[, method])

Reindex exogenous_time_series with the index of time_series.

feature_extraction.CustomFeature(func, **kwargs)

Constructs a transformer from an arbitrary callable.

gtime.feature_generation: Feature Generation

The gtime.feature_generation module deals with the creation of features that do not depend on the input data, but just on its index.


Create a sinusoid from a given date and with a given period and amplitude.

feature_generation.Constant([constant, length])

Generate a pd.DataFrame with one column, of the same length as the input X and containing the value constant across the whole column.

feature_generation.Calendar([region, …])

Create a feature based on the national holidays of a specific country.

gtime.forecasting: Forecasting

The gtime.forecasting module contains a collection of machine learning models, for dealing with time series data.

forecasting.GAR(estimator[, n_jobs])

Generalized Auto Regression model.


Generalized Auto Regression model with feedforward training.

forecasting.TrendForecaster(trend, trend_x0)

Trend forecasting model.

gtime.regressors: Regressors

The gtime.regressors module contains regression models.


Implementation of a LinearRegressor that takes a custom loss function.

gtime.metrics: Metrics

The gtime.metrics module contains a collection of different metrics.

metrics.smape(y_true, List, numpy.ndarray], …)

Compute the ‘Symmetric Mean Absolute Percentage Error’ (SMAPE) between two vectors.

metrics.max_error(y_true, List, …)

Compute the maximum error between two vectors.

gtime.model_selection: Model Selection

The gtime.model_selection module deals with model selection.


Splits the feature matrices X and y in X_train, y_train, X_test, y_test.

model_selection.horizon_shift(time_series, …)

Perform a shift of the original time_series for each time step between 1 and horizon.

gtime.preprocessing: Preprocessing

The gtime.preprocessing module deals with the preprocessing of time series data.

preprocessing.TimeSeriesPreparation([start, …])

Transforms an array-like sequence in a period-index DataFrame with a single column.