I have been trying to call a function in
Python. When calling I'm getting an error saying that
there's no applicable method 'predict' for the object 'rpart'
I have tried importing
rpy2 package and tried to call it but still I'm getting the same error
def function(arg1,arg2,arg3,arg4, arg5,arg6): r=ro.r r.source(path) final_dataframe =r.getValues(arg1,arg2,arg3,arg4, arg5,arg6) return final_dataframe
getValues is a function in
R that will be returning the predicted values.
I'm expecting the predicted values but I'm getting the actual value as the mentioned error before