Error random_state parameter changed by estimator
I am working on adding a new estimator to the scikit-learn library, but the make command always exits with the below error message: AssertionError: Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit. Can you help me understand what the issue is? Error log: self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__> msg = ‘Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.' def fail(self, msg=None): """Fail immediately, with the given message."""
raise self.failureException(msg)
E AssertionError: Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit. msg = 'Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.' self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__> Thanks in advance, Manoj Karthick Selva Kumar
Hey Manoj, I think that the following link can help you to solve your problem. http://scikit-learn.org/stable/developers/contributing.html#random-numbers Best, Chris On Sat, Mar 31, 2018 at 5:38 AM, Manoj Karthick <mkselvak@sfu.ca> wrote:
I am working on adding a new estimator to the scikit-learn library, but the make command always exits with the below error message:
AssertionError: Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.
Can you help me understand what the issue is?
Error log:
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__> msg = ‘Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.'
def fail(self, msg=None): """Fail immediately, with the given message."""> raise self.failureException(msg) E AssertionError: Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.
msg = 'Estimator XYZ should not change or mutate the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.' self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>
Thanks in advance, Manoj Karthick Selva Kumar
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn
participants (2)
-
Chris Aridas -
Manoj Karthick