Nearest Neighbors
k-nearest neighbor classification
To train a k-nearest neighbor model, use the Classification
      Learner app. For greater flexibility, train a k-nearest neighbor
     model using fitcknn in the command-line interface. After training, predict
     labels or estimate posterior probabilities by passing the model and predictor data to
      predict.
Apps
| Classification Learner | Train models to classify data using supervised machine learning | 
Blocks
| ClassificationKNN Predict | Classify observations using nearest neighbor classification model (Since R2022b) | 
Functions
Objects
Topics
- Visualize Decision Surfaces of Different ClassifiersThis example shows how to visualize the decision surface for different classification algorithms. 
- Supervised Learning Workflow and AlgorithmsUnderstand the steps for supervised learning and the characteristics of nonparametric classification and regression functions. 
- Classification Using Nearest NeighborsCategorize 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)