0

I am unable to fix the code for decision tree prediction. So, my dataset includes 20 variables.

Data Set

Then, I partitioned my data and created a decision tree

Parition of data

Decision Tree

But while predicting the data, it displays an error.

Error

Dolly
  • 1
  • 1
  • 1
    Please don't post data or code as images. See [how to create a reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) so that we can copy/paste code to test it to help you debug it. But the error seems to imply that you are trying to predict on values that were not observed during training. That's not really something that most statistical model can accommodate. If you need statistical advice, you'll want to ask at [stats.se] instead. – MrFlick May 04 '22 at 17:14
  • @MrFlick: I am very new to stack overflow so I didn't know this. Thank you for your advice. I will definitely follow your instructions in nearby future :) – Dolly May 04 '22 at 21:54

0 Answers0