Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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

Risposte (0)

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by