Nearest Neighbors
To train ak-nearest neighbors model, use theClassification Learnerapp. For greater flexibility, train ak-nearest neighbors model usingfitcknn
in the command-line interface. After training, predict labels or estimate posterior probabilities by passing the model and predictor data topredict
.
Apps
Classification Learner | Train models to classify data using supervised machine learning |
Functions
Objects
Topics
Train Nearest Neighbor Classifiers Using Classification Learner App
Create and compare nearest neighbor classifiers, and export trained models to make predictions for new data.
Visualize Decision Surfaces of Different Classifiers
This example shows how to visualize the decision surface for different classification algorithms.
Supervised Learning Workflow and Algorithms
Understand the steps for supervised learning and the characteristics of nonparametric classification and regression functions.
Classification Using Nearest Neighbors
Categorize data points based on their distance to points in a training data set, using a variety of distance metrics.
Related Information
Speaker Identification Using Pitch and MFCC(Audio Toolbox)