15b8e291b4f100036059013106d0a68dd6ddbf7b,mlxtend/classifier/tests/test_logistic_regression.py,,test_l2_regularization_gd,#,46

Before Change


    expect_weights = np.array([0.303, 1.066, 2.329])

    np.testing.assert_almost_equal(lr.w_, expect_weights, 3)
    acc = sum(y_pred == y) / len(y)
    assert(acc == 1.0)


def test_l2_regularization_sgd():

After Change


    expect_weights = np.array([0.153, 1.055, 2.284])

    np.testing.assert_almost_equal(lr.w_, expect_weights, 3)
    y_pred = lr.predict(X)
    acc = np.sum(y == y_pred, axis=0) / float(X.shape[0])
    assert acc == 1.0, "Acc: %s" % acc


def test_l2_regularization_sgd():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: rasbt/mlxtend
Commit Name: 15b8e291b4f100036059013106d0a68dd6ddbf7b
Time: 2016-03-16
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/tests/test_logistic_regression.py
Class Name:
Method Name: test_l2_regularization_gd


Project Name: rasbt/mlxtend
Commit Name: 15b8e291b4f100036059013106d0a68dd6ddbf7b
Time: 2016-03-16
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/tests/test_logistic_regression.py
Class Name:
Method Name: test_l2_regularization_sgd


Project Name: rasbt/mlxtend
Commit Name: 364625b410d7978ec6837d57d4057c9fc6afde88
Time: 2016-03-12
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/tests/test_logistic_regression.py
Class Name:
Method Name: test_l2_regularization_gd


Project Name: rasbt/mlxtend
Commit Name: 364625b410d7978ec6837d57d4057c9fc6afde88
Time: 2016-03-12
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/tests/test_logistic_regression.py
Class Name:
Method Name: test_l2_regularization_sgd