Skip to content

Instantly share code, notes, and snippets.

@pprett
Created October 6, 2014 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pprett/44d8bb3cbfe84c06a158 to your computer and use it in GitHub Desktop.
Save pprett/44d8bb3cbfe84c06a158 to your computer and use it in GitHub Desktop.
Lightning CDClassifier does not converge
from lightning.impl.primal_cd import CDClassifier
from lightning.impl.datasets.samples_generator import make_classification
bin_dense, bin_target = make_classification(n_samples=20000, n_features=100, n_informative=5,
n_classes=2, random_state=0, flip_y=0.2)
est = CDClassifier(C=1.0, alpha=0.01, random_state=0, penalty="l2", loss="log", verbose=3, max_iter=100)
est.fit(bin_dense[:10000,:], bin_target[:10000])
est.score(bin_dense[10000:,:], bin_target[10000:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment