When building a high-quality, predictive classification model,
it is important to select the right features (or predictors) and tune
hyperparameters (model parameters not fit to the data). You can tune
hyperparameters by iterating between choosing values for them, and
cross-validating a model using your choices. For example, to tune
an SVM model, choose a set of box constraints and kernel scales, and
then cross-validate a model for each pair of values. Certain Statistics and Machine Learning Toolbox™ classification
functions additionally offer automatic hyperparameter tuning through
Bayesian optimization, grid search, or random search. However,
bayesopt, which is the main function to
implement Bayesian optimization, is flexible enough for many other
applications. For more details, see Bayesian Optimization Workflow.
Typically, feature selection and hyperparameter tuning can yield multiple models. You can simply compare the k-fold misclassification rates, ROC curves, or confusion matrices among the models. Or, conduct a statistical test to detect whether a classification model significantly outperforms another.
To build and assess classification models interactively, use the Classification Learner app.
|Classification Learner||Train models to classify data using supervised machine learning|
Workflow for training, comparing and improving models, including automated, manual, and parallel training.
Compare model accuracy scores, visualize results by plotting class predictions, and check performance per class in the Confusion Matrix.
Identify useful predictors using plots, manually select features to include, and transform features using PCA in Classification Learner.
Learn about feature selection algorithms, such as sequential feature selection.
Perform Bayesian optimization using a fit function
or by calling
Create variables for Bayesian optimization.
Create the objective function for Bayesian optimization.
Set different types of constraint for Bayesian optimization.
Minimize cross-validation loss using
Minimize cross-validation loss using the
OptimizeParameters name-value pair in a
Visually monitor a Bayesian optimization.
Monitor a Bayesian optimization.
Understand underlying algorithms for Bayesian optimization.
Speed up cross-validation using parallel computing.
Examine the performance of a classification algorithm on a specific test data set using a receiver operating characteristic curve.