7405624b2ec337f2db2b3f652aba7b2f6c70268c,lightning/tests/test_primal_cd.py,,test_lower_bound_binary,#,275
Before Change
Cmin = C_lower_bound(bin_dense, bin_target)
clf = PrimalLinearSVC(C=Cmin, random_state=0, penalty="l1")
clf.fit(bin_dense, bin_target)
n_nz = np.sum(clf.coef_ != 0)
assert_equal(0, n_nz)
clf = PrimalLinearSVC(C=Cmin * 2, random_state=0, penalty="l1")
clf.fit(bin_dense, bin_target)
n_nz = np.sum(clf.coef_ != 0)
assert_not_equal(0, n_nz)
def test_lower_bound_multi():
After Change
Cmin = loss.C_lower_bound(bin_dense, bin_target)
clf = CDClassifier(C=Cmin, random_state=0, penalty="l1")
clf.fit(bin_dense, bin_target)
n_nz = clf.n_nonzero()
assert_equal(0, n_nz)
clf = CDClassifier(C=Cmin * 2, random_state=0, penalty="l1")
clf.fit(bin_dense, bin_target)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 10
Instances
Project Name: scikit-learn-contrib/lightning
Commit Name: 7405624b2ec337f2db2b3f652aba7b2f6c70268c
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_primal_cd.py
Class Name:
Method Name: test_lower_bound_binary
Project Name: scikit-learn-contrib/lightning
Commit Name: 7405624b2ec337f2db2b3f652aba7b2f6c70268c
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_primal_cd.py
Class Name:
Method Name: test_warm_start_l1r
Project Name: scikit-learn-contrib/lightning
Commit Name: 7405624b2ec337f2db2b3f652aba7b2f6c70268c
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_primal_cd.py
Class Name:
Method Name: test_fit_rbf_binary_l1r
Project Name: scikit-learn-contrib/lightning
Commit Name: 7405624b2ec337f2db2b3f652aba7b2f6c70268c
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_primal_cd.py
Class Name:
Method Name: test_fit_linear_binary_l1r
Project Name: scikit-learn-contrib/lightning
Commit Name: 7405624b2ec337f2db2b3f652aba7b2f6c70268c
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_primal_cd.py
Class Name:
Method Name: test_warm_start_l1r_rbf
Project Name: scikit-learn-contrib/lightning
Commit Name: 7405624b2ec337f2db2b3f652aba7b2f6c70268c
Time: 2013-04-19
Author: mathieu@mblondel.org
File Name: lightning/tests/test_primal_cd.py
Class Name:
Method Name: test_lower_bound_binary