<p dir="auto">add random_state parameter to SVC.predict_proba() to allow reproducibility.<br>
this is needed since SVC.predict_proba() uses cross validation</p>
<p dir="auto">From one run to another sklearn.metrics.tests.test_metrics.test_precision_recall_curve failed. Any ideas <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnothman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnothman">@jnothman</a> ?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
FAIL: Test Area under Receiver Operating Characteristic (ROC) curve
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/nose/case.py&quot;, line 197, in runTest
    self.test(*self.arg)
  File &quot;/Users/ajoly/git/scikit-learn/sklearn/metrics/tests/test_metrics.py&quot;, line 353, in test_roc_curve
    assert_array_almost_equal(roc_auc, 0.90, decimal=2)
  File &quot;/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py&quot;, line 812, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File &quot;/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py&quot;, line 645, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 100.0%)
 x: array(0.09919999999999998)
 y: array(0.9)
&gt;&gt;  raise AssertionError('\nArrays are not almost equal to 2 decimals\n\n(mismatch 100.0%)\n x: array(0.09919999999999998)\n y: array(0.9)')


======================================================================
FAIL: sklearn.metrics.tests.test_metrics.test_precision_recall_curve
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/nose/case.py&quot;, line 197, in runTest
    self.test(*self.arg)
  File &quot;/Users/ajoly/git/scikit-learn/sklearn/metrics/tests/test_metrics.py&quot;, line 866, in test_precision_recall_curve
    _test_precision_recall_curve(y_true, probas_pred)
  File &quot;/Users/ajoly/git/scikit-learn/sklearn/metrics/tests/test_metrics.py&quot;, line 888, in _test_precision_recall_curve
    assert_array_almost_equal(precision_recall_auc, 0.85, 2)
  File &quot;/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py&quot;, line 812, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File &quot;/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py&quot;, line 645, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 100.0%)
 x: array(0.3218346431373276)
 y: array(0.85)
&gt;&gt;  raise AssertionError('\nArrays are not almost equal to 2 decimals\n\n(mismatch 100.0%)\n x: array(0.3218346431373276)\n y: array(0.85)')

"><pre class="notranslate"><code class="notranslate">======================================================================
FAIL: Test Area under Receiver Operating Characteristic (ROC) curve
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/ajoly/git/scikit-learn/sklearn/metrics/tests/test_metrics.py", line 353, in test_roc_curve
    assert_array_almost_equal(roc_auc, 0.90, decimal=2)
  File "/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py", line 812, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py", line 645, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 100.0%)
 x: array(0.09919999999999998)
 y: array(0.9)
&gt;&gt;  raise AssertionError('\nArrays are not almost equal to 2 decimals\n\n(mismatch 100.0%)\n x: array(0.09919999999999998)\n y: array(0.9)')


======================================================================
FAIL: sklearn.metrics.tests.test_metrics.test_precision_recall_curve
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/ajoly/git/scikit-learn/sklearn/metrics/tests/test_metrics.py", line 866, in test_precision_recall_curve
    _test_precision_recall_curve(y_true, probas_pred)
  File "/Users/ajoly/git/scikit-learn/sklearn/metrics/tests/test_metrics.py", line 888, in _test_precision_recall_curve
    assert_array_almost_equal(precision_recall_auc, 0.85, 2)
  File "/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py", line 812, in assert_array_almost_equal
    header=('Arrays are not almost equal to %d decimals' % decimal))
  File "/Users/ajoly/.virtualenvs/sklearn/lib/python2.7/site-packages/numpy/testing/utils.py", line 645, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 2 decimals

(mismatch 100.0%)
 x: array(0.3218346431373276)
 y: array(0.85)
&gt;&gt;  raise AssertionError('\nArrays are not almost equal to 2 decimals\n\n(mismatch 100.0%)\n x: array(0.3218346431373276)\n y: array(0.85)')


</code></pre></div>