the predict functon is showing some issue
https://drive.google.com/file/d/1r4i_CDep0IcYpPqByPvKBqRQ3vw19V3e/view?usp=sharing
the predict functon is showing some issue
https://drive.google.com/file/d/1r4i_CDep0IcYpPqByPvKBqRQ3vw19V3e/view?usp=sharing
Hey @rohit_1906, i have tried making predictions on xtr and it is working completely fine. This error will general occur when you compare a string value with integer value.
def predict(self,test):
print(self.fkey,test,self.fval)
print("-------")
if test[self.fkey] > self.fval:
if self.right is None:
return self.target
return self.right.predict(test)
else:
if self.left is None:
return self.target
return self.left.predict(test)
Change your predict function to this, and check which value is causing this error.
Hope this resolved your doubt. 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.