擅长:python、mysql、java
<p>预测值是给出解释变量的概率,更准确地说是观察到1的概率。</p>
<p>为了得到0,1的预测,你需要选择一个阈值,比如0.5的等阈值,并将1赋给阈值以上的概率。</p>
<p>比如说,如果是努比</p>
<pre><code>predicted = results.predict(x_for_prediction)
predicted_choice = (predicted > threshold).astype(int)
</code></pre>