Main Content

La traducción de esta página está obsoleta. Haga clic aquí para ver la última versión en inglés.

Vecinos más próximos

Clasificación de los k 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 LearnerEntrenar modelos para clasificar datos usando machine learning supervisado

Funciones

expandir todo

fitcknnFit k-nearest neighbor classifier
ExhaustiveSearcherCreate exhaustive nearest neighbor searcher
KDTreeSearcherCreate Kd-tree nearest neighbor searcher
creatensCreate nearest neighbor searcher object
limeLocal interpretable model-agnostic explanations (LIME)
partialDependenceCompute partial dependence
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
shapleyShapley values
crossvalCross-validate machine learning model
kfoldEdgeClassification edge for cross-validated classification model
kfoldLossClassification loss for cross-validated classification model
kfoldfunCross-validate function for classification
kfoldMarginClassification margins for cross-validated classification model
kfoldPredictClassify observations in cross-validated classification model
lossLoss of k-nearest neighbor classifier
resubLossResubstitution classification loss
compareHoldoutCompare accuracies of two classification models using new data
edgeEdge of k-nearest neighbor classifier
marginMargin of k-nearest neighbor classifier
resubEdgeResubstitution classification edge
resubMarginResubstitution classification margin
testckfoldCompare accuracies of two classification models by repeated cross-validation
predictPredict labels using k-nearest neighbor classification model
resubPredictClassify training data using trained classifier
gatherGather properties of Statistics and Machine Learning Toolbox object from GPU
pdistDistancia por pares entre pares de observaciones
pdist2Pairwise distance between two sets of observations

Objetos

expandir todo

ClassificationKNNk-nearest neighbor classification
ClassificationPartitionedModelCross-validated classification model

Temas

Información relacionada