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

Respuestas (1)

Ilya
Ilya el 17 de Oct. de 2012

0 votos

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.

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

May
el 17 de Oct. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by