e706526aef384392be0395e7c69e3795289ada11,nilearn/decoding/tests/test_same_api.py,,test_same_energy_calculus_pure_lasso,#,40
Before Change
def test_same_energy_calculus_pure_lasso():
rng = check_random_state(42)
dim = (16, 16)
np.random.seed(0)
n = 40
p = dim[0] * dim[1]
w = rng.randn(*dim)
X = np.ones((n, 1)) + w.ravel().T
X += np.random.randn(n, p)
y = np.dot(X, w.ravel())
// check funcvals
mask = np.ones(dim).astype(np.bool)
f1 = squared_loss(X, y, w[mask])
f2 = squared_loss_and_spatial_grad(X, y, w.ravel(), mask, 0.)
assert_equal(f1, f2)
After Change
def test_same_energy_calculus_pure_lasso():
rng = check_random_state(42)
X, y, w, mask = _make_data(rng=rng, masked=True)
// check funcvals
f1 = squared_loss(X, y, w)
f2 = squared_loss_and_spatial_grad(X, y, w.ravel(), mask, 0.)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 25
Instances
Project Name: nilearn/nilearn
Commit Name: e706526aef384392be0395e7c69e3795289ada11
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_same_energy_calculus_pure_lasso
Project Name: nilearn/nilearn
Commit Name: e706526aef384392be0395e7c69e3795289ada11
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_smoothlasso_and_tv_same_for_pure_l1_another_test
Project Name: nilearn/nilearn
Commit Name: 56f63c1ee1e1bf5d06550373b39caa085fdc9f12
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_smoothlasso_and_tv_same_for_pure_l1_another_test
Project Name: nilearn/nilearn
Commit Name: e706526aef384392be0395e7c69e3795289ada11
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_same_energy_calculus_pure_lasso
Project Name: nilearn/nilearn
Commit Name: 56f63c1ee1e1bf5d06550373b39caa085fdc9f12
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_same_energy_calculus_pure_lasso