Classification Learner App
Choose among various algorithms to train and validate classification models for binary or multiclass problems. After training multiple models, compare their validation errors side-by-side, and then choose the best model. To help you decide which algorithm to use, see Train Classification Models in Classification Learner App.
This flow chart shows a common workflow for training classification models, or classifiers, in the Classification Learner app.

If you want to run experiments using one of the models you trained in Classification Learner, you can export the model to the Experiment Manager app. For more information, see Export Model from Classification Learner to Experiment Manager.
To learn how to train and validate regression models, see Regression Learner.
Apps
| Classification Learner | Train models to classify data using supervised machine learning |
| Experiment Manager | Create and run experiments to train and compare machine learning models (Since R2023a) |
Topics
Common Workflow
- Start a Classification Learner or Regression Learner Session
Start an app session by importing data from a file or the workspace, or by opening a saved app session. - Select Validation Scheme in Classification Learner or Regression Learner
Select a validation scheme to examine the predictive accuracy of models that you train. - Train Classification Models in Classification Learner App
Workflow for training, comparing and improving classification models, including automated, manual, and parallel training. - Choose Classifier Options in Classification Learner
In Classification Learner, automatically train a selection of models, or compare and tune options in decision tree, discriminant analysis, logistic regression, naive Bayes, support vector machine, nearest neighbor, kernel approximation, ensemble, and neural network models. - Import Trained Model from Workspace into Classification Learner or Regression Learner
Import a trained model, including its training data, from the workspace at the start of a new session, or import a compatible trained model during the current session. (Since R2026a) - Train Decision Trees Using Classification Learner App
Create and compare classification trees, and export trained models to make predictions for new data.
Customized Workflow
- Feature Selection and Feature Transformation Using Classification Learner App
Identify useful predictors using plots or feature ranking algorithms, select features to include, and transform features using PCA in Classification Learner. - Hyperparameter Optimization in Classification Learner App
Automatically tune hyperparameters of classification models by using hyperparameter optimization. - Train Classifier Using Hyperparameter Optimization in Classification Learner App
Train a classification support vector machine (SVM) model with optimized hyperparameters. - Misclassification Costs in Classification Learner App
Before training any classification models, specify the costs associated with misclassifying the observations of one class into another. - Train and Compare Classifiers Using Misclassification Costs in Classification Learner App
Create classifiers after specifying misclassification costs, and compare the accuracy and total misclassification cost of the models. - Edit Customizable Neural Network Using Network Editor in Classification Learner or Regression Learner
Edit a customizable neural network using the Network Editor, and then train the model and use training progress plots to check for overfitting. (Since R2026a) - Build Condition Model for Industrial Machinery and Manufacturing Processes
Train a binary classification model using Classification Learner App to detect anomalies in sensor data collected from an industrial manufacturing machine. - Human Activity Recognition Simulink Model for Smartphone Deployment
Generate code from a classification Simulink® model prepared for deployment to a smartphone.
Assess Model Performance
- Visualize and Assess Classifier Performance in Classification Learner
Compare model accuracy values, visualize results by plotting class predictions, and check performance per class in the confusion matrix. - Check Classifier Performance Using Test Data Set in Classification Learner App
Import a test data set into Classification Learner, and check the test metrics for the best-performing trained models. - Use Partial Dependence Plots to Interpret Classifiers Trained in Classification Learner App
Determine how features are used in trained classifiers by creating partial dependence plots. - Test Trained Models in Classification Learner or Regression Learner
Test trained models to assess performance in real-world scenarios with unseen data. - Explain Model Predictions for Classifiers Trained in Classification Learner App
To understand how trained classifiers use predictors to make predictions, use global and local interpretability tools, such as permutation importance plots, partial dependence plots, LIME values, and Shapley values.
Export Models, Partitions, Data Sets, and Plots
- Export Classification Model to Predict New Data
After training a model in Classification Learner, export the model to the workspace to make predictions on new data, and deploy the model to MATLAB® Compiler™. - Export Classification Model to MATLAB Coder to Generate C/C++ Code
After training a model in Classification Learner, export the model to MATLAB Coder™ to generate C/C++ code for prediction. - Generate MATLAB Code to Train Model with New Data
After training a model in Classification Learner, generate MATLAB code. - Generate Code at Command Line Using Model Exported from Machine Learning App
Train a classification model using the Classification Learner app, and generate C/C++ code for prediction at the MATLAB command line. - Code Generation for Binary GLM Logistic Regression Model Trained in Classification Learner
This example shows how to train a binary GLM logistic regression model using Classification Learner, and then generate C code that predicts labels using the exported classification model. - Export Classification Model to Make Predictions in Simulink
After training a model in Classification Learner, export the model to Simulink. - Export Classification Model for Deployment to MATLAB Production Server
After training a model in Classification Learner, export the model for deployment to MATLAB Production Server™. - Deploy Model Trained in Classification Learner to MATLAB Production Server
Train a model in Classification Learner and export it for deployment to MATLAB Production Server. - Export Partitions and Data Sets from Classification Learner or Regression Learner
In Classification Learner and Regression Learner, export validation partitions, test partitions, and data sets to the workspace. (Since R2026a) - Export Plots in Classification Learner App
Export and customize plots created before and after training.
Experiment Manager Workflow
- Export Model from Classification Learner to Experiment Manager
Export a classification model to Experiment Manager to perform multiple experiments. - Tune Classification Model Using Experiment Manager
Use different training data sets, hyperparameters, and visualizations to tune an efficient linear classifier in Experiment Manager.
Related Information
- Machine Learning in MATLAB
- Manage Experiments (Deep Learning Toolbox)
Teaching Resources
Machine Learning for Biosciences
Learn the basics of machine learning with biologically motivated examples.
