Vecinos más próximos
Para entrenar un modelo de los k vecinos más próximos, utilice la app Classification Learner. Para mayor flexibilidad, entrene un modelo de los k vecinos más próximos mediante fitcknn
en la interfaz de línea de comandos. Tras el entrenamiento, prediga las etiquetas o calcule las probabilidades a posteriori pasando el modelo y los datos de los predictores a predict
.
Apps
Classification Learner | Entrenar modelos para clasificar datos usando machine learning supervisado |
Bloques
ClassificationKNN Predict | Classify observations using nearest neighbor classification model (desde R2022b) |
Funciones
Objetos
Temas
- 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.
Información relacionada
- Speaker Identification Using Pitch and MFCC (Audio Toolbox)