[scikit-learn] Model trained in 0.17 gives entirely different results in 0.15

Matthieu Brucher matthieu.brucher at gmail.com
Wed Aug 3 15:16:23 EDT 2016

More often than not, forward compatiblity is not possible. I don't think
there are lots of companies doing so, as even backward compatibility is
tricky to achieve.
Even with serializing the version, if the previous version doesn't know
about the additional data structures that have an impact on the model, you
are screwed. I don't think there is anything you can expect for forward


2016-08-03 19:29 GMT+01:00 Andreas Mueller <t3kcit at gmail.com>:

> Hi Shi.
> In general, there is no guarantee that models built with one version will
> work in a different version.
> In particular, loading in an older version when built in a newer version
> seems something that's tricky to achieve.
> We might want to warn the user when doing this. The docs are not very
> explicit about this.
> Opened an issue:
> https://github.com/scikit-learn/scikit-learn/issues/7135
> Andy
> On 08/02/2016 05:02 PM, Shi Yu wrote:
> Hello,
> We trained SVM models in scikit-learn 0.17 and saved it as pickle files.
> When loading the models back in a lower version of scikit-learn 0.15, the
> outputs are entirely different.  Basically for binary classification
> problem, for the same test data,  it swapped the probabilities and gave an
> opposite prediction.  In 0.17 the probability is [0.02668825,  0.97331175]
> and the prediction is 1.  In 0.15 the probability is [0.97331175,
> 0.02668825] and the prediction is 0.
> I wonder is anyone seeing the same issue, or it has been notified.  I
> could provide more details for error replication if required.
> Best,
> Shi
> _______________________________________________
> scikit-learn mailing listscikit-learn at python.orghttps://mail.python.org/mailman/listinfo/scikit-learn
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

Information System Engineer, Ph.D.
Blog: http://blog.audio-tk.com/
LinkedIn: http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20160803/b2c7560a/attachment-0001.html>

More information about the scikit-learn mailing list