Skip to content

Instantly share code, notes, and snippets.

@MechCoder
Created May 30, 2014 11:57
Show Gist options
  • Save MechCoder/9b8234c8887d9ca6d55f to your computer and use it in GitHub Desktop.
Save MechCoder/9b8234c8887d9ca6d55f to your computer and use it in GitHub Desktop.
from sklearn.linear_model import LogisticRegressionCV
from sklearn.datasets import make_classification
from time import time
import numpy as np
rng = np.random.RandomState(0)
X, y = make_classification(n_samples=2000, n_features=2000, random_state=rng)
clf = LogisticRegressionCV(n_jobs=4, Cs=[1, 10, 100, 1000], cv=10)
t = time()
clf.fit(X, y)
print time() - t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment