Skip to content

Instantly share code, notes, and snippets.

View richardtomsett's full-sized avatar

Richard richardtomsett

View GitHub Profile
@richardtomsett
richardtomsett / predict_proba() NaN issue
Last active July 23, 2020 16:39
Reproducing an issue with predict_proba() returning NaN values for linear classifiers with log loss in scikit learn
import sklearn
import sklearn.metrics
from sklearn.datasets import make_classification
from sklearn.linear_model import SGDClassifier
import numpy as np
# Create some training and testing data
data_size = 10000
train_size = 9000
test_size = data_size - train_size

Keybase proof

I hereby claim:

  • I am richardtomsett on github.
  • I am richardtomsett (https://keybase.io/richardtomsett) on keybase.
  • I have a public key whose fingerprint is A3D9 F67E 0553 FC08 398F 3A91 B423 05A1 9A51 6EF6

To claim this, I am signing this object: