分类学习器
以交互方式训练、验证和调整分类模型
可以选择各种算法来训练和验证二类问题或多类问题的分类模型。训练多个模型后,可以横向比较它们的验证误差,然后选择最佳模型。要帮助您确定使用哪种算法,请参阅Train Classification Models in Classification Learner App。
此流程图显示在分类学习器中训练分类模型或分类器的常见工作流。
如果您要使用您在分类学习器中训练的模型之一来运行试验,您可以将该模型导出至试验管理器。有关详细信息,请参阅Export Model from Classification Learner to Experiment Manager。
App
主题
常见工作流
- Train Classification Models in Classification Learner App
Workflow for training, comparing and improving classification models, including automated, manual, and parallel training. - 选择分类数据或打开保存的 App 会话
将数据从工作区或文件导入分类学习器,查找示例数据集,选择交叉验证或留出法验证选项,并留出数据进行测试。或者,打开一个之前保存的 App 会话。 - Choose Classifier Options
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. - 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. - Export Classification Model to Predict New Data
After training in Classification Learner, export models to the workspace and Simulink®, generate MATLAB® code, generate C code for prediction, or export models for deployment to MATLAB Production Server™. - Train Decision Trees Using Classification Learner App
Create and compare classification trees, and export trained models to make predictions for new data. - Train Discriminant Analysis Classifiers Using Classification Learner App
Create and compare discriminant analysis classifiers, and export trained models to make predictions for new data. - Train Binary GLM Logistic Regression Classifier Using Classification Learner App
Create and compare binary logistic regression classifiers, and export trained models to make predictions for new data. - Train Naive Bayes Classifiers Using Classification Learner App
Create and compare naive Bayes classifiers, and export trained models to make predictions for new data. - Train Support Vector Machines Using Classification Learner App
Create and compare support vector machine (SVM) classifiers, and export trained models to make predictions for new data. - Train Nearest Neighbor Classifiers Using Classification Learner App
Create and compare nearest neighbor classifiers, and export trained models to make predictions for new data. - Train Kernel Approximation Classifiers Using Classification Learner App
Create and compare kernel approximation classifiers, and export trained models to make predictions for new data. - Train Ensemble Classifiers Using Classification Learner App
Create and compare ensemble classifiers, and export trained models to make predictions for new data. - Train Neural Network Classifiers Using Classification Learner App
Create and compare neural network classifiers, and export trained models to make predictions for new data.
自定义工作流
- 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. - 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. - 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. - Check Classifier Performance Using Test Set in Classification Learner App
Import a test set into Classification Learner, and check the test set metrics for the best-performing trained models. - 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 partial dependence plots, LIME values, and Shapley values. - 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. - Export Plots in Classification Learner App
Export and customize plots created before and after training. - Code Generation and Classification Learner App
Train a classification model using the Classification Learner app, and generate C/C++ code for prediction. - 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. - 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. - 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.
试验管理器工作流
- 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.
相关信息
- Machine Learning in MATLAB
- 管理试验 (Deep Learning Toolbox)