Ticket #660: pickleError.py

File pickleError.py, 619 bytes (added by janez, 4 years ago)
Line 
1import pickle
2import orange
3
4data = orange.ExampleTable(r"c:\Python26\Lib\site-packages\orange\doc\datasets\primary-tumor.tab")
5
6##############################################################################
7## preprocess Data set
8transformer = orange.DomainContinuizer()
9transformer.multinomialTreatment = orange.DomainContinuizer.NValues
10transformer.continuousTreatment = orange.DomainContinuizer.NormalizeBySpan
11transformer.classTreatment = orange.DomainContinuizer.Ignore
12domain = transformer(data)
13
14classifier = pickle.load(open('classifier.pkl', 'rb'))
15pickle.dump(classifier, open('tmp.pkl', "wb"))