def test_lasso_stability_path():
    """Check lasso stability path"""
    # Load diabetes data and add noisy features
    scaling = 0.3
    coef_grid, scores_path = lasso_stability_path(X, y, scaling=scaling, random_state=42, n_resampling=30)

    assert_equal(np.argsort(F)[-3:], np.argsort(np.sum(scores_path, axis=1))[-3:])
Example #2
0
def test_lasso_stability_path():
    """Check lasso stability path"""
    # Load diabetes data and add noisy features
    scaling = 0.3
    coef_grid, scores_path = lasso_stability_path(X, y, scaling=scaling,
                                        random_state=42, n_resampling=30)

    assert_array_equal(np.argsort(F)[-3:],
                       np.argsort(np.sum(scores_path, axis=1))[-3:])