在各种算法中选择训练和验证分类模型,以解决二进制或多类问题。训练多个模型后,将其验证错误并排比较,然后选择最佳模型。要帮助您确定要使用哪种算法,请参阅分类学习者应用中的火车分类模型.
该流程图显示了分类学习者应用程序中训练分类模型或分类器的常见工作流程。
分类学习者 | 火车模型使用监督的机器学习对数据进行分类 |
用于培训,比较和改进分类模型的工作流程,包括自动化,手动和并行培训。
Select Data and Validation for Classification Problem
将数据从工作区或文件中导入分类学习者,查找示例数据集,然后选择交叉验证或保留验证选项。
在分类学习者中,会自动训练模型的选择,或在决策树,判别分析,逻辑回归,天真的贝叶斯,支持向量机,最近的邻居,内核近似,集合和神经网络模型中进行比较和调整选项。金宝app
Assess Classifier Performance in Classification Learner
Compare model accuracy scores, 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, generate MATLAB®code, generate C code for prediction, or export models for deployment toMATLAB Production Server™.
创建和比较分类树和导出训练有素的模型,以对新数据进行预测。
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 Logistic Regression Classifiers Using Classification Learner App
Create and compare 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.
Create and compare support vector machine (SVM) classifiers, and export trained models to make predictions for new data.
Create and compare nearest neighbor 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.
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, manually 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.
Create classifiers after specifying misclassification costs, and compare the accuracy and total misclassification cost of the models.
通过使用超参数优化来自动调整分类模型的超参数。
Train Classifier Using Hyperparameter Optimization in Classification Learner App
使用优化的超参数训练分类支持向量机(SVM)模金宝app型。
Check Classifier Performance Using Test Set in Classification Learner App
将测试集导入分类学习者,并检查测试集指标是否表现最好的训练有素。
Export Plots in Classification Learner App
Export and customize plots created before and after training.
Code Generation and Classification Learner App
使用分类学习者应用训练分类模型,并生成C/C ++代码进行预测。
This example shows how to train a logistic regression model using Classification Learner, and then generate C code that predicts labels using the exported classification model.
Train a model in Classification Learner and export it for deployment toMATLAB Production Server.