Classregtree with multiple dependent variables
이전 댓글 표시
I am trying to use classregtree with a set of independent variables among which are dummy variables and categorical ones,I can not perform the regression tree except for only one variable and it has to be numeric (It is my first time on Matlab) Could anybody please help me Thanks
답변 (1개)
Ilya
2012년 10월 17일
0 개 추천
Your title says "multiple dependent variables", and your question says "a set of independent variables". Do you have multiple dependent variables or multiple independent variables or both?
classregtree can only handle scalar response. That is, you must pass Y to classregtree(X,Y) as a vector with one value per observation (row) in X. If you have multiple response values per observation, you can't use classregtree.
You must pass X as an N-by-P matrix for N observations and P variables. X must be numeric. If you have categorical variables, code them as integers and use 'categorical' parameter to tell classregtree the indices of columns in X that have these categorical variables. You do not need to "dummify" your variables - classregtree will do it for you.
카테고리
도움말 센터 및 File Exchange에서 MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!