필터 지우기
필터 지우기

What is 'cat' param used for in TreeBagger method

조회 수: 1 (최근 30일)
dennis vella
dennis vella 2013년 3월 16일
I am following the tutorial and am trying to implement TreeBagger Method. I have a question since I cannot understand part of the code.
b = TreeBagger(nTrees,X,Y,'oobpred','on','cat',6,'minleaf',leaf(ii));
can anyone tell me what 'cat' is and the number 6 please?
Thanks

답변 (2개)

Walter Roberson
Walter Roberson 2013년 3월 16일
TreeBagger also accepts classregtree options.
categorical — Vector of indices of the columns of X that are to be treated as unordered categorical variables
  댓글 수: 1
dennis vella
dennis vella 2013년 3월 16일
Does this mean that the number listed near 'cat' is possibly the number of columns that a dataset would have?

댓글을 달려면 로그인하십시오.


Tom Lane
Tom Lane 2013년 3월 16일
This means that column 6 of X is to be treated as categorical. Suppose it takes values 1,2,3. If X were continuous, splits would be of the form
x<1.5 % separates 1 from {2,3}, or
x<2.5 % separates {1,2} from 3
If X were categorical, then there is no ordering assumed so you could have a split that separates class 2 from classes {1,3}.

카테고리

Help CenterFile Exchange에서 Classification Ensembles에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by