agramfort/scikit-learn — pull request #4 by vene (2012-08-29 18:27:40+00:00)
Title: WIP: return_path option in lars_path

Memory improvement:

```
# almost calls %memit lars_path(*make_regression(argv[1], argv[2]), method="lasso", return_path=?)
X.shape: (300, 3000): 27.511719 MB vs 17.441406 MB
X.shape: (3000, 2000): 30.214844 MB vs 24.542969 MB
```

Intuitively correct since the memory improvement depends on the `n_features`.

Timings show minimal (<10 ms, attributed to randomness) differences between before and now. Technically it should be slightly faster with `return_path=False` but this will only show in multitarget.

Remember, the slowdown was because in multitarget, a whole `coef_path` is allocated for every target.