and this Git repository: https://github.com/analyticsvidhya/CPT
My question is: how can I save the trained model? When trying to pickle it, this error comes up:
PicklingError Traceback (most recent call last)
1 # save the model to disk
2 filename = ‘model4.sav’
----> 3 pickle.dump(model4, open(filename, ‘wb’))
PicklingError: Can’t pickle <class ‘main.PredictionTree’>: it’s not the same object as main.PredictionTree
Hope you guys can help me out here. Thanks!