diff --git a/README.rst b/README.rst index b4bc297..4ccf67e 100644 --- a/README.rst +++ b/README.rst @@ -31,12 +31,11 @@ Time Series Forecasting Model Giotto-time provide the GAR class (Generalize Auto Regressive model). It operates in a similar way to the standard AR, but with an arbitrary number of features and with an arbitrary underlying regression model. -.. image:: https://storage.googleapis.com/l2f-open-models/giotto-time/images/gar.png - :height: 100px - :width: 200 px - :scale: 50 % - :alt: alternate text - :align: center +.. raw:: html + +
+ +
This model allows the full force of machine learning regressors (compatible with the fit-transform framework ok scikit-learn) to be combined with advanced feature creation stratagies to forecast time series in a convienent api. @@ -52,6 +51,7 @@ This model allows the full force of machine learning regressors (compatible with >>> horizon=4, >>> features = [ShiftFeature(1), ShiftFeature(2), MovingAverageFeature(5)] >>> ) +>>> >>> train_test_splitter = TrainTestSplitter() >>> time_series_model = GAR(base_model=LinearRegressor()) >>> @@ -67,6 +67,15 @@ Time Series Preparation To transform an input array-like structure into a DataFrame with a PeriodIndex we provide the classes: +To transform an input array-like structure into a DataFrame with a PeriodIndex we provide the classes: + +* TimeSeriesPreparation +* TimeSeriesConversion +* SequenceToTimeIndexSeries +* PandasSeriesToTimeIndexSeries +* TimeIndexSeriesToPeriodIndexSeries + + Feature Creation ================ @@ -84,4 +93,48 @@ These features all have a scikit-learn-like interface and behave as transformers The class FeatureCreation wraps a list of features together and returns the X and y matrices from a time series given as input. +Time Series Trend Model +======================= + +We provide main classes to analyze and remove trends from time series in order to create trend stationary time series. + +Specifically, giotto-time includes ExponentialTrend, PolynomialTrend model classes and de-trending transformers. + +>>> import numpy as np +>>> import pandas as pd +>>> +>>> import matplotlib.pyplot as plt +>>> +>>> from giottotime.models.regressors.linear_regressor import LinearRegressor +>>> from giottotime.loss_functions.loss_functions import max_error, smape +>>> +>>> from giottotime.models.trend_models.polynomial_trend import PolynomialTrend +>>> +>>> from math import pi +>>> +>>> d = pd.read_csv('trend.csv', index_col=0, parse_dates=True) +>>> tm = PolynomialTrend(order=3) +>>> +>>> tm.fit(d) +>>> +>>> d.plot(figsize=(10, 10)) +>>> plt.show() +>>> +>>> detrended = tm.transform(d) +>>> +>>> detrended.plot(figsize=(10, 10)) +>>> plt.show() + +.. raw:: html + ++ | + |
---|