Effacer les filtres
Effacer les filtres

How to create a KNN classification model with categorical AND numerical data?

3 vues (au cours des 30 derniers jours)
Graham
Graham le 3 Déc 2012
Hi,
I'm wanting to fit a KNN classification model to data. The data has numerical AND categorical variables in it.
I know that ClassificationKNN.fit (<http://www.mathworks.com/help/stats/classificationknn.fit.html>) allows you to specify 'CategoricalPredictors' as - 'all' — All predictors are categorical. - [] — No predictors are categorical.
However, is there a way to specify which are categorical and which are numerical since I have both?
If not, how do I use both types?
Graham

Réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by