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 area 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 number of folds. If you want to perform K-fold Cross Validation on regression dataset, please use theCross Validator – RegressionSnap instead. You can use this Snap to determine themost suitablealgorithm for your dataset to train the ML model.
Input and Output
Expected input: A classification dataset is required as an input.
Expected output: The output from the Snap isa statistical information of the ML model depicting the chosen algorithms accuracy with the dataset.
Expected upstream Snap: Any Snap that generates a classification dataset document is usable as an upstream Snap. For example, CSV Generator, JSON Generator, XML Generator, Copy, and so on.
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 (column names and types) from the first row. Therefore, the first row must not have any missing values.
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 bea 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:
Decision Tree
K-Nearest Neighbors
Logistic Regression
Naive Bayes
Support Vector Machines
Decision Stump
Random Forests
Multilayer Perceptron.
The implementations are fromWEKA, 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 field. If the field is left blank,the default values are applied for all the parameters. If specifying multiple parameters, separate them with a comma (,).
SeeOptions for Algorithmssection below for details.
Default value: None
Examples:
batch_size = 120
batch_size = 120, collapse_tree = true
Fold
Required. The number of folds.
.Minimum value: 2
Default value: 10
Use random seed
If selected, Random seed is applied to randomizer in order to get reproducible results
Default value: Selected
Random seed
Required. Number used as static seed for randomizer.
Default value: 12345
Error rendering macro 'excerpt-include' : No link could be created for 'Trainer -- Classification'.
Upgraded with the latest SnapLogic Platform release.
4.26
main11181
Stable
Upgraded with the latest SnapLogic Platform release.
4.25
main9554
Stable
Upgraded with the latest SnapLogic Platform release.
4.24
main8556
Stable
Upgraded with the latest SnapLogic Platform release.
4.23
main7430
Stable
Upgraded with the latest SnapLogic Platform release.
4.22
main6403
Stable
Upgraded with the latest SnapLogic Platform release.
4.21
snapsmrc542
Stable
Upgraded with the latest SnapLogic Platform release.
4.20 Patch
mlcore8770
Stable
Adds the log4j dependency to the ML Core Snaps to resolve the "Could not initialize class org.apache.log4j.LogManager" error.
4.20
snapsmrc535
Stable
Upgraded with the latest SnapLogic Platform release.
4.19
snapsmrc528
Stable
Upgraded with the latest SnapLogic Platform release.
4.18
snapsmrc523
Stable
Upgraded with the latest SnapLogic Platform release.
4.17 Patch
ALL7402
Latest
Pushed automatic rebuild of the latest version of each Snap Pack to SnapLogic UAT and Elastic servers.
4.17
snapsmrc515
Latest
New Snap: Introducing the Clustering Snap thatperforms exploratory data analysis to find hidden patterns or groupings in data.
Enhanced the AutoML Snap. You can now:
Select algorithms to derive the top models.
Input the best model generated by another AutoML Snap from a previous execution.
View an interactive HTML report that contains statistics of up to 10 models.
Added the Snap Execution field to all Standard-mode Snaps. In some Snaps, this field replaces the existing Execute during preview check box.
4.16
snapsmrc508
Stable
New Snap: Introducing the AutoML Snap, which lets you automate the process of selecting machine learning algorithms and tuning hyperparameters. This Snap gives the best predictive model within the specified time limit.
4.15
snapsmrc500
Stable
New Snap Pack. Perform data modeling operations such as model training, cross-validation, and model-based predictions. Additionally, you can also execute Python scripts remotely. Snaps in this Snap Pack are:
Cross Validator -- Classification
Cross Validator -- Regression
Predictor -- Classification
Predictor -- Regression
Remote Python Script
Trainer -- Classification
Trainer -- Regression
Releases the Remote Python Executor account and the Remote Python Executor Dynamic account for the Remote Python Script Snap.