Feedback

Classify Data Using the Classification Learner App

Classification Learner is a new app in the statistics and machine learning tool box that lets you train models to classify data using supervised machine learning. Classification Learner lets you perform common machine learning tasks, such as importing data, specifying validation schemes, interactively exploring your data, selecting features, training models, and assessing model performance. You can choose from several classification types, including decision trees, support vector machines, nearest neighbors, and ensemble methods that include backed, boosted, and random subspace methods. You can also export classification models to the MATLAB workspace to generate predictions on new data, or generate MATLAB code to integrate train models into applications such as Computer Vision, Signal Processing, or Data Analytics.

You can launch Classification Learner by typing Classification Learner on the MATLAB command line, all by clicking on the Classification Learner app in the apps gallery. Classification Learner lets you import data from matrices or tables. The app can automatically identify your predictors and response variables based on your data type. The next step is to choose the validation scheme used to examine the predictive accuracy of the fitted models. Choose from k-fold cross validation, hold out, or resubstitution.

Pairwise scatterplots lets you explore your data for important predictors, outliers, and visual patterns or trends. When solving classification problems, there is no one size fits all. Different classifiers work best for different types of problems and data sets. The options provided in the classifier gallery are great starting points that are suitable for a range of different classification problems. If you're not sure which to choose, the pop up Tool Tip gives you a brief description of each classifier.

Training a new model is easy. First, simply choose one of the classifier presets in the gallery. Next, click on train. The current model pane displays useful information about your model, such as the classifier type, presets, selected features, and status of the model, if it is trained, untrained, or training. Once the model is trained, check the History List to see the accuracy of the classifier on the validation set.

Classification Learner lets you train multiple models very quickly. For each trained model, you can compare model performance by inspecting results in the scatter plot, confusion matrix, and ROC curves available in the plot section of the tool strip. On the scatter plot, cross syndicate misclassified points. Confusion matrix lets you assess how a currently selected classifier performed in each class. A dominantly diagonal confusion matrix indicates a good classifier, since all the predictor labels match the actual labels. Off diagonal numbers indicating misclassified points.

ROC or Receiver Operating Characteristic Curve, shows you true positive rate versus false positive rate for different thresholds of the classifier output. A perfect result with no misclassified points is a right angle at the top left of the plot. The area under the curve is a measure of the overall quality of the classifier. Based on your model assessment, if you decide that a model may be improved further, you can try removing features with low predictive power, or use the advanced options to change classifier settings.

After you create classification models interactively in Classification Learner, you can export your best performing model, shown by the green box. Click Export, and the model should appear in your MATLAB workspace. You can use this trained model to make predictions on new data. You can also generate MATLAB code for your best model to train the classifiers on new data, or integrate code into other machine learning applications.

When working with Classification Learner, help is always just a click away. Simply navigate to the documentation using the Help button on the top right to find all the information you need about Classification Learner. For example, the table here shows you guidance on choosing the right classifier depending on accuracy, speed, and memory trade-off you want to make.

To get additional information about Classification Learner, as well as see and download example datasets, please visit the Classification Learner page. You can access the page by clicking on apps, and then Classification Learner from the statistics and machine learning tool box product page. This concludes the video introduction to Classification Learner. Thank you for watching.