Created
October 6, 2014 11:11
-
-
Save pprett/44d8bb3cbfe84c06a158 to your computer and use it in GitHub Desktop.
Lightning CDClassifier does not converge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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