On this Page
Table of Contents | ||||
---|---|---|---|---|
|
Overview
This is a Transform type Snap that performs K-fold Cross Validation on a classification dataset. Cross validation is a technique for evaluating ML algorithms by splitting the original dataset into K equally-sized chunks. K is the number of folds. In each of the K iterations, K-1 chunks are used to train the model while the last chunk is used as a test set. The average accuracy and other statistics are computed to be used to select the most suitable algorithm for the dataset.
In the settings, you can select the algorithm, specify parameters, and the number of folds. If you want to perform K-fold Cross Validation on regression dataset, use the Cross Validator – Regression Snap instead.
Input and Output
Expected input: The classification dataset.
Expected output: A statistical information about the performance of the selected algorithm on the dataset.
Expected upstream Snap: Any Snap that generates a classification dataset document. For example, CSV Generator, JSON Generator, or a combination of File Reader and JSON Parser.
Expected downstream Snap: CSV/JSON Formatter Snap and File Writer Snap can be used to write the output statistics to file.
Prerequisites
- The data from upstream Snap must be in tabular format (no nested structure).
- This Snap automatically derives the schema (field names and types) from the first document. Therefore, the first document must not have any missing values.
Configuring Accounts
Accounts are not used with this Snap.
Configuring Views
Input | This Snap has exactly one document input view. |
---|---|
Output | This Snap has exactly one document output view. |
Error | This Snap has at most one document error view. |
Troubleshooting
None.
Limitations and Known Issues
None.
Modes
- Ultra Pipelines: Does not work in Ultra Pipelines.
Snap Settings
Label | Required. The name for the Snap. Modify this to be more specific, especially if there are more than one of the same Snap in the pipeline. | |
---|---|---|
Label field | Required. The label or output field in the dataset. This must be a categorical type represented as text (string data type). This is the field that the ML model will be trained to predict. Default value: None Example: $class | |
Algorithm | Required. The classification algorithm to be used to build the model. There are eight classification algorithms available currently:
The implementations are from WEKA, an open source machine learning library in Java. Default value: Decision Tree | |
Option | The parameters to be applied on the selected classification algorithm. Each algorithm has a different set of parameters to be configured in this property. If this property is left blank, the default values are applied for all the parameters. If specifying multiple parameters, separate them with a comma ",". See Options for Algorithms section below for details. Default value: None Examples:
| |
Fold | Required. The number of folds. Minimum value: 2 Default value: 10 | |
Use random seed | If selected, Random seed is applied to the randomizer in order to get reproducible results. Default value: Selected | |
Random seed | Required. Number used as static seed for randomizer. Default value: 12345 | |
| name | Snap Execution|
page | Anaplan Read | Multiexcerpt include macro | |
name | Snap_Execution_Introduced | page | Anaplan Read
Options for Algorithms
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
Anchor | ||||
---|---|---|---|---|
|
Excerpt | |||||||
---|---|---|---|---|---|---|---|
Weight Balance Classification – Cross ValidationThis pipeline demonstrates a typical cross validation exercise for a dataset before an model is trained for predictions. The dataset is a record of the weight on each side of a weighing scale, the distance of each scale from the ground, and its status of balance. The cross validation is to validate the model's ability to predict this status of balance. Download this pipeline.
|
Additional Example
The following use case demonstrates a real-world scenario for using this Snap:
Downloads
Multiexcerpt include macro | ||||
---|---|---|---|---|
|
Attachments | ||
---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|