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

4 ビュー (過去 30 日間)
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?

回答 (1 件)

Maurice Boueri
Maurice Boueri 2011 年 1 月 19 日
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);

カテゴリ

Help Center および File ExchangeGet Started with 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