Feature encoding
editFeature encoding
editThis functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
Machine learning models can only work with numerical values. For this reason, it is necessary to transform the categorical values of the relevant features into numerical ones. This process is called feature encoding.
Data frame analytics automatically performs feature encoding. The input data is pre-processed with the following encoding techniques:
- one-hot encoding: Assigns vectors to each category. The vector represent whether the corresponding feature is present (1) or not (0).
- target-mean encoding: Replaces categorical values with the mean value of the target variable.
- frequency encoding: Takes into account how many times a given categorical value is present in relation with a feature.
When the model makes predictions on new data, the data needs to be processed in the same way it was trained. Machine learning model inference in the Elastic Stack does this automatically, so the automatically applied encodings are used in each call for inference.
Feature importance is calculated for the original categorical fields, not the automatically encoded features.