Skip to content

Instantly share code, notes, and snippets.

@adhadse
Created March 18, 2021 02:49
Show Gist options
  • Save adhadse/f0dbe3a6a8545e13778f50dbac23404a to your computer and use it in GitHub Desktop.
Save adhadse/f0dbe3a6a8545e13778f50dbac23404a to your computer and use it in GitHub Desktop.
In[1] y_scores = clf.decision_function([instance_from_test_set])
no_threshold = 0
y_some_prediction = (y_scores > no_hreshold)
y_some_prediction
Out[1] array([True])
In[2] # Threshold returned from plotting func
y_some_prediction = (y_score > threshold)
y_some_prediction
Out[2] array([False])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment