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

2 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by