Machine & Deep Learning Compendium

Searchβ¦

Timeseries

- 1.

- 1.
- 2.

- 1.
- 2.
**(really good)****A LightGBM Autoregressor β Using Sktime****, explains about the basics in time series prediction, splitting, next step, delayed step, multi step, deseason.** - 3.
- 4.
- 5.β
**TSlearn****- DTW, shapes, shapelets (keras layer), time series kmeans/clustering/svm/svr/KNN/bary centers/PAA/SAX**β - 6.β
**DTAIDistance****- Library for time series distances (e.g. Dynamic Time Warping) used in the****DTAI Research Group****. The library offers a pure Python implementation and a faster implementation in C. The C implementation has only Cython as a dependency. It is compatible with Numpy and Pandas and implemented to avoid unnecessary data copy operations****dtaidistance.clustering.hierarchical**β

- 1.
**Semi supervised with DTAIDistance - Active semi-supervised clustering**

- 1.β
**Affine warp****, a neural net with time warping - as part of the following manuscript, which focuses on analysis of large-scale neural recordings (though this code can be also be applied to many other data types)** - 2.
- 3.β

β**A great introduction into time series**** - βThe approach is to come up with a list of features that captures the temporal aspects so that the auto correlation information is not lost.β basically tells us to take sequence features and create (auto)-correlated new variables using a time window, i.e., βTime series forecasts as regression that factor in autocorrelation as well.β. we can transform raw features into other type of features that explain the relationship in time between features. we measure success using loss functions, MAE RMSE MAPE RMSEP AC-ERROR-RATE
**

β**Interesting idea**** on how to define βtime seriesβ dummy variables that utilize beginning\end of certain holiday events, including important information on what NOT to filter even if it seems insignificant, such as zero sales that may indicate some relationship to many sales the following day.
**

**A trend (a,b,c) exists when there is a long-term increase or decrease in the data.****A seasonal (a - big waves) pattern occurs when a time series is affected by seasonal factors such as the time of the year or the day of the week. The monthly sales induced by the change in cost at the end of the calendar year.****A cycle (a) occurs when the data exhibit rises and falls that are not of a fixed period - sometimes years.**

β**Some statistical measures**** (mean, median, percentiles, iqr, std dev, bivariate statistics - correlation between variables)**

**White-noise has autocorrelation of 0.**β

**Average: Forecasts of all future values are equal to the mean of the historical data.****Naive: Forecasts are simply set to be the value of the last observation.****Seasonal Naive: forecast to be equal to the last observed value from the same season of the year****Drift: A variation on the naΓ―ve method is to allow the forecasts to increase or decrease over time, the drift is set to be the average change seen in the historical data.**

**Log****Box cox****Back transform****Calendrical adjustments****Inflation adjustment**

- 1.

**Dummy variables: sunday, monday, tues,wed,thurs, friday. NO SATURDAY!****notice that only six dummy variables are needed to code seven categories. That is because the seventh category (in this case Sunday) is specified when the dummy variables are all set to zero. Many beginners will try to add a seventh dummy variable for the seventh category. This is known as the "dummy variable trap" because it will cause the regression to fail.****Outliers: If there is an outlier in the data, rather than omit it, you can use a dummy variable to remove its effect. In this case, the dummy variable takes value one for that observation and zero everywhere else.****Public holidays: For daily data, the effect of public holidays can be accounted for by including a dummy variable predictor taking value one on public holidays and zero elsewhere.****Easter: is different from most holidays because it is not held on the same date each year and the effect can last for several days. In this case, a dummy variable can be used with value one where any part of the holiday falls in the particular time period and zero otherwise.****Trading days: The number of trading days in a month can vary considerably and can have a substantial effect on sales data. To allow for this, the number of trading days in each month can be included as a predictor. An alternative that allows for the effects of different days of the week has the following predictors. # Mondays in month;# Tuesdays in month;# Sundays in month.****Advertising: $advertising for previous month;$advertising for two months previously**

**3-5-7-9? If its too large its going to flatten the curve, too low its going to be similar to the actual curve.****two tier moving average, first 4 then 2 on the resulted moving average.**

- 1.
- 2.ββ
- 3.ββ

- 1.
**Level. The baseline value for the series if it were a straight line.** - 2.
**Trend. The optional and often linear increasing or decreasing behavior of the series over time.** - 3.
**Seasonality. The optional repeating patterns or cycles of behavior over time.** - 4.
**Noise. The optional variability in the observations that cannot be explained by the model.**

**linear/nonlinear classifiers: predict a single output value - using the t-1 previous line, i.e., βmeasure1 t, measure 2 t, measure 1 t+1, measure 2 t+1 (as the class)β****Neural networks: predict multiple output values, i.e., βmeasure1 t, measure 2 t, measure 1 t+1(class1), measure 2 t+1(class2)β**

**βmeasure1 t, measure1 t+1(class) , measure1 t+2(class1)β**

β**This article explains**** about ML Methods for Sequential Supervised Learning - Six methods that have been applied to solve sequential supervised learning problems: **

- 1.
**sliding-window methods - converts a sequential supervised problem into a classical supervised problem** - 2.
**recurrent sliding windows** - 3.
**hidden Markov models** - 4.
**maximum entropy Markov models** - 5.
**input-output Markov models** - 6.
**conditional random fields** - 7.
**graph transformer networks**

β**What is?**** A time series without a trend or seasonality, in other words non-stationary has a trend or seasonality**

- 1.
**T+1 - T** - 2.
**Bigger lag to support seasonal changes** - 3.
**pandas.diff()** - 4.
**Plot a histogram, plot a log(X) as well.** - 5.
**Test for the unit root null hypothesis - i.e., use the Augmented dickey fuller test to determine if two samples originate in a stationary or a non-stationary (seasonal/trend) time series**

- 1.
- 2.β
**PDarima -****Pmdarimaβs auto_arima function is extremely useful when building an ARIMA model as it helps us identify the most optimal p,d,q parameters and return a fitted ARIMA model.** - 4.
- 1.
**Autoregression (AR)** - 2.
**Moving Average (MA)** - 3.
**Autoregressive Moving Average (ARMA)** - 4.
**Autoregressive Integrated Moving Average (ARIMA)** - 5.
**Seasonal Autoregressive Integrated Moving-Average (SARIMA)** - 6.
**Seasonal Autoregressive Integrated Moving-Average with Exogenous Regressors (SARIMAX)** - 7.
**Vector Autoregression (VAR)** - 8.
**Vector Autoregression Moving-Average (VARMA)** - 9.
**Vector Autoregression Moving-Average with Exogenous Regressors (VARMAX)** - 10.
**Simple Exponential Smoothing (SES)** - 11.
**Holt Winterβs Exponential Smoothing (HWES)**

- 1.

**Forget Gate: conditionally decides what information to throw away from the block.****Input Gate: conditionally decides which values from the input to update the memory state.****Output Gate: conditionally decides what to output based on input and the memory of the block.**

- 1.β
**Stackexchange****- Yes, you can use DTW approach for classification and clustering of time series. I've compiled the following resources, which are focused on this very topic (I've recently answered a similar question, but not on this site, so I'm copying the contents here for everybody's convenience):**

- 2.
- 3.

- 1.
- 2.
- 4.
- 6.β
**Adtk****a sklearn-like toolkit with an amazing intro, various algorithms for non seasonal and seasonal, transformers, ensembles.** - 7.
- 9.
- 2.
**You can feed ransac with tsfresh/tslearn features.**

- 11.
- 12.
**STL:**- 3.
- 4.

- 13.
**Sliding windows**- 1.
- 2.

- 16.
- 1.

- 18.

β

- 1.

- 1.
- 2.
- 3.
**Another function for dtw distance in python** - 4.
- 5.
- 6.

- 1.
**(duplicate above in classification)****Stackexchange****- Yes, you can use DTW approach for classification and clustering of time series. I've compiled the following resources, which are focused on this very topic (I've recently answered a similar question, but not on this site, so I'm copying the contents here for everybody's convenience):**

Last modified 9mo ago

Copy link

Contents

TOOLS

Forecasting methods

Data Transformations

SPLITTING TIME SERIES DATA

Evaluate forecast accuracy

Rolling window analysis

Moving average window

Decomposition

Weighted βwindowβ

Time Series Components

STATIONARY TIME SERIES

SHORT TIME SERIES

Kalman filters in matlab

LTSM for time series

CLASSIFICATION

CLUSTERING TS

ANOMALY DETECTION TS

Dynamic Time Warping (DTW)