0

I have a dataset with both categorical and numeric attributes. Also, 17% of the data contains missing values. I want to apply decision trees on it. Can rpart function from rpart library in R be applied? is there any alternative package which can handle the mixed data?

areddy
  • 373
  • 3
  • 7
  • 18
  • Have you tried running it on your data? – ulfelder Sep 03 '15 at 09:46
  • yes. My target variable is categorical. I used method in rpart as "class". The problem I faced is that the prediction is giving me numerical values where I expected 0 or 1 – areddy Sep 03 '15 at 09:49
  • Any way you can post some of your data, or some toy data that mimics your data set's structure and reproduces your problem? – ulfelder Sep 03 '15 at 10:22
  • 1
    What is the range of those numerical values? If they are between 0 and 1 then they represent probabilities. Why did you expect 0 and 1? Is your target variable binary with classes 0s and 1s? – AntoniosK Sep 03 '15 at 10:49

0 Answers0