seasonality
Computes similarity of the words in the input column with the context words.
Usage
Allows to extract seasonality for different date attributes from training data basing on column to pedict
This calculator can be used with the following method:
seasonality
Examples:
Extract week/month seasanalities coefficients from sales history
Main Parameters
The bold options represent the default values when the parameters are optional.
input_columns list of columns used as input of the calculators
output_columns list of columns added by the calculators
global (true, false) Should this calculator be performed before data splitting during training for cross-validation
steps [optionnal] (training, prediction, postprocessing) List of steps in a pipeline where columns from this calculator are added to the data. Note that when the training option is listed, the calculator is actually added during preprocessing.
store_in_model [optionnal] (true, false) Please indicate whether the "calculated" columns by the calculator should be stored in the model or not to avoid recalculating them during prediction. This is only relevant if the calculated columns are added to both training and prediction. Without this parameter, the values will not be stored in the model. The following parameters only make sense if this parameter is set to true.
stored_columns [required if store_in_model is true] List indicating the columns to be stored among the output_columns.
stored_keys [required if store_in_model is true] List indicating the columns to use for identifying the correct values to join on the data for prediction among the stored values (logically, they are to be chosen from the input_columns).
Specific Parameters
value Name of the column to use for extracting seasonality
time_col Name of the column that contains time
Examples
We want to capture additional weekly effects on sales. The
month
column is calculated from thedate_attribute
.Store_in_model
is used because the weekly seasonality coefficient will be computed during training and applied during prediction.
Example of output:
1
0.95168072905404733
2
1.0357862750651963
3
1.0792659328597893
4
1.0395920562861072
5
1.0606537886934222
6
1.077858133811912
7
0.90191046323711832
8
0.95522180681369606
9
1.0252685243518904
10
0.97325249153619431
11
0.82898384742434672
12
0.99689396468790548
Imagine you have
model_resolution
in your model. In this case, your coefficient will be computed per resolution. If you want to maintain the computation as described above, useglobal: true
.
Example of output:
1
0.56073028043659023
BELGIUM
JUMBO
2
0.7477214898040766
BELGIUM
JUMBO
1
0.97832471421812339
BELGIUM
MEDIUM
2
1.0817738908560632
BELGIUM
MEDIUM
1
0.8893741423322854
BELGIUM
XS
2
1.2777182380138707
BELGIUM
XS
1
0.94944234555496687
IRELAND
JUMBO
2
0.99525831058681336
IRELAND
JUMBO
1
0.927610409362476
IRELAND
LARGE
2
1.016215614376581
IRELAND
LARGE
1
0.89273852338090465
IRELAND
MEGA
2
1.0118941815702633
IRELAND
MEGA
1
0.9948854555639558
LUXEMBOURG
JUMBO
2
1.0520470613380593
LUXEMBOURG
JUMBO
1
0.93302404196451849
LUXEMBOURG
LARGE
2
0.95808824169437257
LUXEMBOURG
LARGE
Last updated