Which function should I use to classify an input data into one of ten classes in Statistics Toolbox 7.1 (R2010a)?

1 vue (au cours des 30 derniers jours)
I have an input data that has two categorical values: hobbies, favorite food. Hobbies can take 50 different values and favorite food can take 12 values. The issue is that I am using CLASSREGTREE and the number of values hobbies can take exceeds the upper bound on the maximum number of values categorical values can take, which is 32. Is CLASSREGTREE a right approach or are there other functions in the Statistics Toolbox suitable for this task?

Réponses (1)

Maurice Boueri
Maurice Boueri le 19 Jan 2011
There are two ways to solve this problem:
1) CLASSREGTREE can be used to solve this classification problem because response values are ordinal. Convert the numerical YFIT output from CLASSREGTREE/EVAL to integer by calling ceil(YFIT)). Note that when many levels in the predictor variables, even when the number of levels, L, is less than 32, calling CLASSREGTREE with 'classification' method would be very slow, because it has to go through all 2^(L-1) possibilities.
2) NaiveBayes can be used as follows:
NB=NaiveBayes.fit([hobbies favFoods],ageGroups, 'dist','mvmn');
C= NB.predict(newData);

Catégories

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

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by