How to use clssregtree function for a mixture of conitious and categorical explanatory variables?

I am using classregtree function, i have my explanatory variables as a mixture of categorical and numerical. How can i run classregtree with such data. If i try converting the categorical variables as numbers the function is treating the variables as continious instead of categorical. Please Help!!!

 채택된 답변

Tom Lane
Tom Lane 2012년 5월 26일
You can use the 'categorical' option to tell classregtree which columns to treat as categorical.

댓글 수: 2

Thanks Tom!! I have one more question..
Is there a way to store the classregtree object (i mean the t = classregtree(x,y), t) Can we save "t" and retrieve to use in other datasets.
You can use t with other datasets. You can use the save command to save it in a .mat file, along with any other workspace variables you choose to save.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Predictive Maintenance Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by