my_classifiers = {'logit': '<trained_logit_here>',
'KNN' : '<trained_KNN_here>'
}
pickle._dump(my_classifiers, open(filename, 'wb'))
loaded_classifiers = pickle.load(open(filename, 'rb'))
logit_model = loaded_classifiers['logit']
knn_model = loaded_classifiers['KNN']
results = logit_model.predict(X)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter