Skip to main content

Classification tool icon Classification Tool

Use the Classification tool as part of a machine-learning pipeline to identify what category a target belongs to. The tool provides several algorithms you can use to train a model. The tool also allows you to tune a model using many parameters.

Alteryx Intelligence Suite Required

This tool is part of Alteryx Intelligence Suite. Intelligence Suite requires a separate license and add-on installer to Designer. After you install Designer, install Intelligence Suite and start your free trial.

Configure the Tool

This section contains info about how to configure the Classification tool.

Select Algorithm

Select what algorithm you want to use. You can choose Logistic Regression, Decision Tree, Random Forest, or XGBoost.

Configure Parameters

Configure the parameters. Each algorithm has different parameters from other algorithms. Each algorithm also has both general and advanced parameters. General parameters are integral to creating an accurate model, even for beginners. Advanced parameters might improve accuracy, but require in-depth understanding of what they do.

Reference the table for each algorithm to see what parameters do:

Name

Description

Options

Default

Class Weight

Class Weight assigns weights to different classes in the dataset. Some algorithms overvalue prevailing classes, resulting in imbalances. This parameter helps balance classes in the dataset by assigning additional weight to minority classes.

  • None

  • Balanced

None

Fit Intercept

Decide whether you want the algorithm to calculate the intercept for your linear-regression model. Also known as the "constant," the intercept is the expected mean value of y where x equals 0.

  • None

  • Scale Intercept

Scale Intercept: 1.0

Max Iterations

Max Iterations specifies the maximum number of iterations to allow solvers to converge. Models with more iterations capture more information about the data.

Any integer.

100

Multiclass

Multiclass specifies whether the algorithm needs to handle more than two classes.

  • Auto autoselects Multinomial or OVR.

  • Multinomial is capable of multiclass or binary classification.

  • OVR is capable of binary classification.

Auto

Penalty

Penalty, also known as "regularization," refers to the practice of modifying the loss function to penalize certain values that the model would overvalue otherwise. L1 (Lasso Regression) and L2 (Ridge Regression) are two methods of specifying the penalty term.

  • L1 helps find the most important features in datasets with many features by setting some weights to 0.

  • L2 helps all features contribute to the model by making sure weights are non-zero.

L2

Problem Formulation

Problem Formulation transforms a primal optimization problem into a dual problem.

  • Primal

  • Dual*

*You can only use Dual if you select the L2 option for Penalty and Liblinear for Solver.

Primal

Random Seed

Random Seed specifies the starting number for generating a pseudorandom sequence. If you select None, a random-number generator picks a starting number.

  • Seed

  • None

Seed:10

Solver

Solver is the method the logistic-regression uses to optimize its curve to best fit the data by determining sigmoid weights.

  • Liblinear: Use this method for smaller datasets, where you want to apply a penalty. Liblinear requires a penalty.

  • SAG: Use this method for larger datasets, where you want to apply an L2 penalty or no penalty.

  • SAGA: Use this method for larger datasets, where you want to apply an L1 penalty or no penalty.

  • LBFGS: Use this method for smaller datasets, where you want to apply an L2 penalty or no penalty.

  • Newton-CG: Use this method for smaller datasets, where you want to apply an L2 penalty or no penalty.

Liblinear

Tolerance

Tolerance sets the stopping criteria for when the algorithm should detect that parameters are close enough to convergence (in other words, remain constant).

Any positive float.

.0001

Tuner

Regularization Tuner (C) allows you to adjust the amount of penalty (in other words, regularization) you apply, effectively limiting features that are heavily weighted by the model. Format this parameter as a positive float.

Any positive float.

1.0

Name

Description

Options

Default

Class Weight

Class Weight assigns weights to the different classes in the dataset.

  • None

  • Balanced

None

Criterion

Use the Criterion parameter to select a method to measure how well the decision-tree algorithm splits your data into different nodes.

  • Gini Impurity

  • Entropy

Gini Impurity

Max Depth

Max Depth is the longest path from a root to a leaf of a tree. Deeper trees have more splits and capture more information about the data.

  • Unlimited: Nodes expand until all leaf nodes are pure (in other words, consist completely of data that belong to a single class) or until all leaf nodes contain less than what you specify in the Min Samples Split parameter.

  • Limited: Limits the expansion by splits.

Unlimited

Max Features

Max Features sets the maximum number of features your decision tree considers when looking for a best first split.

  • Auto: Evaluate a number of features equal to the total number of features in the dataset.

  • None: Evaluate a number of features equal to the total number of features in the dataset.

  • Square Root: Evaluate a number of features equal to the square root of the total number of features in the dataset.

  • Log2: Evaluate a number of features equal to the binary logarithm of the total number of features.

  • User-Selected Integer: Evaluate a number of features at each split equal to the number you select.

  • User-Selected Fraction: Evaluate a number of features equal to a user-selected fraction of the total number of features.

Auto

Max Leaf Nodes

Max Leaf Nodes is the upward limit on the total number of leaf nodes your algorithm can generate. It grows nodes up to the maximum number in a best-first manner. The algorithm determines what nodes are best based on their capacity for impurity reduction. Use the Criterion parameter to specify how you want to measure impurity reduction.

Any integer or None.

None

Min Impurity Decrease

Min Impurity Decrease sets the minimum threshold of impurity reduction required for the decision tree to split into a new node. So a split occurs where it would decrease impurity by an amount equal to or greater than Min Impurity Decrease. Use the Criterion parameter to specify how you want to measure impurity reduction.

Any float.

0.0

Min Samples Split

Min Samples Split sets the minimum threshold of samples required for the decision tree to split into a new node. The algorithm can consider as few as one sample or as many as all samples.

Any integer or fraction.

Integer: 2

Min Weight Fraction Leaf

Min Weight Fraction Leaf is the minimum threshold of weight required for the decision tree to split into a new node. That threshold is equal to the minimum fraction of the total weights for all samples. The decision-tree algorithm assumes equal weights by default.

Any float.

0.0

Random Seed

Random Seed specifies the starting number for generating a pseudorandom sequence. If you select None, a random-number generator picks a starting number.

  • Seed: Select an integer for the random-number generator.

  • None: No repeatability.

Seed: 10

Splitter

Splitter is the strategy used for splitting at a node. It includes options for the best first split and the best random split. The algorithm determines what nodes are best based on their capacity for impurity reduction.

  • Best: Best requires more computational power and might risk overfitting.

  • Random: Random might find paths through the tree if certain associations have weak signals.

Best

Name

Description

Options

Default

Bootstrap

Bootstrapping, the foundation of bagging, is a method used to sample the dataset for purposes of training. This method involves iteratively creating subsamples of your dataset to simulate new, unseen data, which you can use to improve the generalizability of your model.

  • On

  • Off

On

Class Weight

Class Weight assigns weights to the different classes in the dataset. Random-forest algorithms tend to overvalue prevailing classes, resulting in imbalances. Class Weight helps balance classes in the dataset by assigning additional weight to minority classes. Balancing classes can improve model performance. By default, all classes have a weight of 1.

  • None: Class Weight is the default (in other words, 1) for all classes.

  • Balanced: Select this option to have the random-forest algorithm automatically adjust class weights based on the number of samples in each class.

None

Criterion

Use the Criterion parameter to select a method to measure how well the random-forest algorithm splits your data into different nodes.

  • Gini Impurity

  • Entropy

Gini Impurity

Max Depth

Max Depth is the longest path from a root to a leaf for each tree in the forest. Deeper trees have more splits and capture more information about the data.

  • Unlimited: Nodes expand until all leaf nodes are pure (in other words, consist completely of data that belong to a single class) or until all leaf nodes contain less than what you specify in the Min Samples Split parameter.

  • Limited: Limits the expansion by splits.

Limited: 10

Max Features

Max Features sets the maximum number of features each decision tree in the forest considers when looking for a best first split.

  • Auto: Evaluate a number of features equal to the total number of features in the dataset.

  • None: Evaluate a number of features equal to the total number of features in the dataset.

  • Square Root: Evaluate a number of features equal to the square root of the total number of features in the dataset.

  • Log2: Evaluate a number of features equal to the binary logarithm of the total number of features.

  • User-Selected Integer: Evaluate a number of features at each split equal to the number you select.

  • User-Selected Fraction: Evaluate a number of features equal to a user-selected fraction of the total number of features.

Auto

Min Impurity Decrease

Min Impurity Decrease sets the minimum threshold of impurity reduction required for a decision tree to split into a new node. So a split occurs where it would decrease impurity by an amount equal to or greater than Min Impurity Decrease. Use the Criterion parameter to specify how you want to measure impurity reduction.

Any float.

0.0

Min Samples Split

Min Samples Split sets the minimum threshold of samples required for the decision tree (in a random forest) to split into a new node. The algorithm can consider as few as one sample or as many as all samples.

Any integer or fraction.

Integer: 2

Min Weight Fraction Leaf

Min Weight Fraction Leaf is the minimum threshold of weight required for a decision tree to split into a new node. That threshold is equal to the minimum fraction of the total weights for all samples. The random-forest algorithm assumes equal weights by default.

Any float.

0.0

Number of Estimators

Number of Estimators is the number of trees you want to create as part of the forest.

Any integer.

100

Random Seed

Random Seed specifies the starting number for generating a pseudorandom sequence. If you select None, a random-number generator picks a starting number.

  • Seed: Select an integer for the random number generator.

  • None: No repeatability.

Seed: 10

Name

Description

Options

Default

Sample Columns by Level

Sample Features by Level is the percentage of data that the algorithm randomly creates a subsample for each depth level in a tree.

Any float from 0 to 1.

1

Sample Columns by Node

Sample Features by Node is the percentage of data that the algorithm randomly creates a subsample for each node in a tree.

Any float from 0 to 1.

1

Sample Columns by Tree

Sample Features by Tree is the percentage of data that the algorithm randomly creates a subsample for each tree.

Any float from 0 to 1.

1

Gamma

Gamma sets the loss reduction required for a decision tree to split into a new node. So a split occurs where it would reduce loss by an amount equal to or greater than Gamma.

Any positive integer or 0.

0

Learning Rate

Learning Rate is the rate at which the algorithm lets new info override old info. Usually you set Learning Rate in logarithmic increments (for example, 0.003, 0.03, 0.3).

Any float from 0 to 1.

0.05

Max Depth

Max Depth is the longest path from a root to a leaf for each tree in the forest. Deeper trees have more splits and capture more information about the data.

Any number equal to or greater than 1.

3

Minimum Child Weight

Minimum Child Weight sets the threshold of Hessian weight required for a decision tree to split into a new node. So a split occurs where it would decrease the Hessian weight by an amount equal to or greater than Minimum Child Weight.

Any positive number or 0.

1

Number of Estimators

Number of Estimators is the number of trees you want to create as part of the forest.

Any number equal to or greater than 1.

100

Random Seed

Random Seed specifies the starting number for generating a pseudorandom sequence.

Any whole number.

10

Subsample

Subsample is the percentage of data that the algorithm randomly creates a subsample of.

Any number from 0 to 1.

1