Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to save Compact Prediction Tree (CPT) model

$
0
0

@schmiddey90 wrote:

Hi guys,

I’m referring to this blog: https://www.analyticsvidhya.com/blog/2018/04/guide-sequence-prediction-using-compact-prediction-tree-python/#comment-152880

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)
in
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!
Cheers
Lasse

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles