<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><p class="">I am working on adding a new estimator to the scikit-learn library, 
but the make command always exits with the below error message:</p><div class=""><pre class="lang-py prettyprinted prettyprint"><code class=""><span class="typ">AssertionError</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Estimator</span><span class="pln"> XYZ should </span><span class="kwd">not</span><span class="pln"> change </span><span class="kwd">or</span><span class="pln"> mutate  the parameter random_state </span><span class="kwd">from</span><span class="pln"> </span><span class="lit">0</span><span class="pln"> to </span><span class="pun"><</span><span class="pln">mtrand</span><span class="pun">.</span><span class="typ">RandomState</span><span class="pln"> object at </span><span class="lit">0x1a25da9e10</span><span class="pun">></span><span class="pln"> during fit</span><span class="pun">.</span></code></pre><pre class="lang-py prettyprinted prettyprint"><code class=""><span class="pun"><br class=""></span></code></pre><pre class="lang-py prettyprinted prettyprint"><code class=""><span class="pun"><p style="font-family: Helvetica; white-space: normal;" class="">Can you help me understand what the issue is?</p><div style="font-family: Helvetica; white-space: normal;" class=""></div><p class="">Error log:</p></span></code></pre><div class=""><pre class="lang-py prettyprinted prettyprint"><code class=""><span class="pln">self </span><span class="pun">=</span><span class="pln"> </span><span class="pun"><</span><span class="pln">sklearn</span><span class="pun">.</span><span class="pln">utils</span><span class="pun">.</span><span class="pln">_unittest_backport</span><span class="pun">.</span><span class="typ">TestCase</span><span class="pln"> testMethod</span><span class="pun">=</span><span class="pln">__init__</span><span class="pun">></span><span class="pln">
msg </span><span class="pun">=</span><span class="pln"> </span><span class="str">‘Estimator XYZ should not change or mutate  the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.'</span><span class="pln">

    </span><span class="kwd">def</span><span class="pln"> fail</span><span class="pun">(</span><span class="pln">self</span><span class="pun">,</span><span class="pln"> msg</span><span class="pun">=</span><span class="kwd">None</span><span class="pun">):</span><span class="pln">
        </span><span class="str">"""Fail immediately, with the given message."""</span><span class="pln">
</span><span class="pun">></span><span class="pln">       </span><span class="kwd">raise</span><span class="pln"> self</span><span class="pun">.</span><span class="pln">failureException</span><span class="pun">(</span><span class="pln">msg</span><span class="pun">)</span><span class="pln">
E       </span><span class="typ">AssertionError</span><span class="pun">:</span><span class="pln"> </span><span class="typ">Estimator</span><span class="pln"> XYZ should </span><span class="kwd">not</span><span class="pln"> change </span><span class="kwd">or</span><span class="pln"> mutate  the parameter random_state </span><span class="kwd">from</span><span class="pln"> </span><span class="lit">0</span><span class="pln"> to </span><span class="pun"><</span><span class="pln">mtrand</span><span class="pun">.</span><span class="typ">RandomState</span><span class="pln"> object at </span><span class="lit">0x1a25da9e10</span><span class="pun">></span><span class="pln"> during fit</span><span class="pun">.</span><span class="pln">

msg        </span><span class="pun">=</span><span class="pln"> </span><span class="str">'Estimator XYZ should not change or mutate  the parameter random_state from 0 to <mtrand.RandomState object at 0x1a25da9e10> during fit.'</span><span class="pln">
self       </span><span class="pun">=</span><span class="pln"> </span><span class="pun"><</span><span class="pln">sklearn</span><span class="pun">.</span><span class="pln">utils</span><span class="pun">.</span><span class="pln">_unittest_backport</span><span class="pun">.</span><span class="typ">TestCase</span><span class="pln"> testMethod</span><span class="pun">=</span><span class="pln">__init__</span><span class="pun">></span></code></pre><div class=""><br class=""></div></div></div><div class=""><br class=""></div><div class="">Thanks in advance,</div><div class="">Manoj Karthick Selva Kumar</div></body></html>