Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: KNN classification model with categorical and numerical data
Replies: 1   Last Post: Dec 3, 2012 12:33 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Graham

Posts: 19
Registered: 9/29/09
KNN classification model with categorical and numerical data
Posted: Dec 3, 2012 8:32 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.