필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Need help with importing database with text field in Regressiontree

조회 수: 2 (최근 30일)
mohamed mizan
mohamed mizan 2014년 8월 20일
마감: MATLAB Answer Bot 2021년 8월 20일
i have database car and i have field michenicname and location how can i use carname ?
I have tried X=[michenicname location Horsepower Weight]
load carsmall % contains Horsepower, Weight, MPG X = [Horsepower Weight]; rtree = fitrtree(X,MPG)

답변 (1개)

Tom Lane
Tom Lane 2014년 8월 23일
You don't say what your data looks like and what problem you are having.
I'm guessing the michenicname variable is text and that's why you're having a problem. You can't concatenate that with numeric variables. Your best bet may be to code the unique string values as group numbers. The grp2idx function may be helpful.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by