09c083533d566441b596012c8dd5a1b42384bc96,nilearn/decoding/tests/test_same_api.py,,test_coef_shape,#,193
Before Change
X, y = iris.data, iris.target
X, mask = to_niimgs(X, (2, 2, 2))
for penalty in ["smooth-lasso", "tv-l1"]:
cv = SpaceNetRegressor(
mask=mask, max_iter=3, penalty=penalty, alpha=1.).fit(X, y)
assert_equal(cv.coef_.ndim, 1)
for penalty in ["smooth-lasso", "tv-l1"]:
cv = SpaceNetClassifier(mask=mask, max_iter=3, penalty=penalty,
After Change
X, y = iris.data, iris.target
X, mask = to_niimgs(X, (2, 2, 2))
for penalty in ["smooth-lasso", "tv-l1"]:
for cls in [SpaceNetRegressor, SpaceNetClassifier]:
model = cls(
mask=mask, max_iter=3, penalty=penalty, alpha=1.).fit(X, y)
assert_equal(model.coef_.ndim, 2)
@nottest
def test_w_shapes():
Test that solvers handle w of same shape (during callbacks, etc.).
pass
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: nilearn/nilearn
Commit Name: 09c083533d566441b596012c8dd5a1b42384bc96
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_coef_shape
Project Name: nilearn/nilearn
Commit Name: f8d50f46b92de712c8317380c552e8028d1013ff
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: examples/decoding/plot_poldrack_space_net.py
Class Name:
Method Name:
Project Name: nilearn/nilearn
Commit Name: 5903f8b38791dc179e8ce77c70d13e6bede6440e
Time: 2015-07-28
Author: elvis.dohmatob@inria.fr
File Name: nilearn/decoding/tests/test_same_api.py
Class Name:
Method Name: test_coef_shape