Table of Contents

Preprocess is used to transform data in accordance with modeling experiment conditions configured in the project. Actually preprocess uses a script which is either loaded from a template, or created visually using the panel **Variables and transformations**.

**Variables and transformations** is a panel accessible via the program menu **View > Variables and transformations**. When enabled, the panel is nested in the **Data explorer** tab. It is used to specify model inputs, targets (predicted columns) and their transformations.

**View by datasets / variables** is a list of datasets connected to the project. The panel is used to selected and then add variables to

**Input variables [n]** is a list of input variables and transformations applied to them. '**n**' is the number of variables in the list. Each row represents a variable or a set of variables in the following format:
**VariableName, transformation1, transformation2, …**

** All** and

** Edit** button in the panel title is used to edit preprocessor script manually via the text editor.

**Target variables [n]** is a list of variables that will be modeled and predicted. '**n**' is the number of variables in the list. Each row represents a variable or a set of variables in the following format: **VariableName, transformation1, transformation2, …**

**Transformations** is a panel used to access various transformations available for **Input variables** and **Target variables**.

** Settings** is a button in the panel title used to modify

**Obligatory transformations** is a dialog accessible via the * Settings* (underlined text button) in the title of the

**Manage text inputs** is used to handle input variables with categories (instead of numeric values). Available options are

**Stop with error** | **Skip column** | **Decompose to binary columns**

**Manage text targets** is used to handle target variables with categories (instead of numeric values). Available options are

**Stop with error** | **Enumerate with 0,1,2,..** | **Decompose to binary columns**

**Limit decomposition to the most frequent labels** is used to limit the number of new variables created in a result of decomposition. Only the most frequent labels are decomposed to separate binary variables. All other labels will be dropped to a binary variable named '** ?**'. The number of new variables including '

`?`

**Treat value as missing if it is outside n*sigma ** is used to replace spikes (i.e. outliers) that exceed certain number of standard deviations. All spikes that exceed

will be replaced with missing values. The way in which missing values are handled can be set using the **n*sigma ****Manage missing values** control.

**Manage missing values** is used to handle various gaps (NULL values) in the data. Available options are

**Stop with error** | **0** | **Interpolate** | **Mean** | **Median** | **Most frequent**.

The first option throws an error when a NULL value is detected. Other options allow replacement of missing values with 0, mean of two neighbouring values (interpolation), arithmetic mean of current variable, median, and the most frequent value.

If time series data is collected from a set of files it is possible to ensure that all files contain recent observations and all series are long enough to be preprocessed properly.

**For short files that can't be preprocessed properly** there are two options: **Stop with error** and **Skip silently**. This parameter matters only when a set of files is imported. If a file contains insufficiently small number of observations you can instruct preprocess to skip the file silently instead of throwing an error.

**Non-recent data detection** finds out if all series comes with the most recent timestamp found in the set of files. There are three options available:

**No detection** | **Stop with error** | **Skip silently**

The last one is used to simply drop non-recent files from the preprocessing results.

GMDH Shell uses different sets of preprocessing features for time series models and all other models, i.e. classification and regression models. A proper set of features is usually loaded form a template, to change it open the menu **File > Configuration**, **Modules** tab, **Preprocess**.

**Simple forecasting** is a panel in the program toolbar used to create time series models.

**Horizon** is the number of observations to be forecasted.

**Holdout** is used to withhold a sample of observations and to evaluate forecast accuracy using the out-of-sample data.

**Time series forecasting** is a panel in the program toolbar used to create time series models.

**Horizon** is the number of observations to be forecasted. GMDH Shell can perform several simulations with different forecast horizons at a time. In order to use this feature you should separate desired forecast horizons with a coma. For example `1,6,12`

.

**Holdout** is used to withhold a sample of observations and to evaluate forecast accuracy using the out-of-sample data.

**Repeat** is used to perform ex-post forecast of several previous horizons at a time.

**Window validation** is the number of experiments used for window size optimization. Optimal window size improves forecast accuracy.

**Hold-out data** panel is used to apply regression and classification models to a subset of observations immediately after the models are obtained. The hold-out sample can be either used to evaluate out-of-sample accuracy or to predict unknown values of target variables.

**Hold-out** is used to select a subsample to which the model will be applied. Available options are to hold-out **last observations** | **observations uniformly** | **missing target values**

In the next two control elements you can set the exact number of **dataset observations** or **% of dataset** to be reserved for the hold-out.

The script is used to specify commands that generate input variables, target variables and various transformations. Preprocess commands are one line, each of them can refer to a group of variables.

One line commands have the following format:

**FileName.VariableName, Transformation1(), Transformation2(), …**

If there is only one file connected, “**FileName.**” prefix is not required.
If a spreadsheet (.xls or .xlsx) contain data in more than one sheet, all variables must be refereed as “**FileName:SheetName.VariableName**”.

To refer a group of variables use the asterisk symbol “** ***”, for example:

`FileName.*`

is used to select all variables from a file.

`*.VariableName`

is used to select variables with certain name from all files.

`*.*`

is used to select all variables from all files (and all sheets).

`*`

is used to select all variables if there is only one file connected.

If a file or a variable contain spaces or reserved symbols in the name, each of the names must be quoted, for example: **“File Name”.”Variable Name”**. If the name contain a quote **“**, it must be doubled, for example **a”b”c** ⇒ **“a”“b”“c”**

A semicolon symbol ”

” allows one line comments.
**;**

Here is the list of available transformations.

Transformation | Notation example | Description |

Square | `x, sqr` | `y=x^2` |

Square root | `x, sqrt` | `y=x^(1/2)` |

Cube | `x, cube` | `y=x^3` |

Cube root | `x, cubert` | `y=x^(1/3)` |

Exp | `x, exp` | `y=exp(x)` |

Logarithm | `x, ln` | `y=ln(|x|), x<>0` |

Sine | `x, sin` | `y=sin(x)` |

Cosine | `x, cos` | `y=cos(x)` |

Arctangent | `x, arctang` | `y=arctang(x)` |

Abs value | `x, abs` | `y=|x|` |

Sign | `x, sign` | `y=sign(x)` |

Floor | `x, floor` | `y=[x]` |

Fractional part | `x, frac` | `y=x-[x]` |

Normalization | `x, norm(b1,b2)` | `b1` is lower boundary, `b2` is upper boundary |