Skip to content

WIP: return_path option in lars_path#4

Closed
vene wants to merge 23 commits intoagramfort:cd_cleanupfrom
vene:alex-dl
Closed

WIP: return_path option in lars_path#4
vene wants to merge 23 commits intoagramfort:cd_cleanupfrom
vene:alex-dl

Conversation

@vene
Copy link
Copy Markdown

@vene vene commented Aug 29, 2012

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.

@vene
Copy link
Copy Markdown
Author

vene commented Aug 29, 2012

Here are some new measurements. Timings are best of 3 (using %timeit).
First column is the PR from @agramfort that this is based on, second column is this.

            #1065       HEAD        master
fit mem     14.72 MB    12.65 MB    15.51 MB
fit         13.3 s      8.77 s      10.7 s
transform   389 ms      194 ms      274 ms

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use assert_true

@vene vene closed this Jan 10, 2013
agramfort pushed a commit that referenced this pull request Aug 18, 2019
* initial commit

* used random class

* fixed failing testcases, reverted __init__.py

* fixed failing testcases #2
- passed rng as parameter to ParameterSampler class
- changed seed from 0 to 42 (as original)

* fixed failing testcases #2
- passed rng as parameter to SparseRandomProjection class

* fixed failing testcases #4
- passed rng as parameter to GaussianRandomProjection class

* fixed failing test case because of flake 8
agramfort pushed a commit that referenced this pull request Aug 18, 2019
* ENH Adds files

* ENH Adds permutation importance

* RFC Better names

* STY Flake8

* ENH: Adds inspect module

* DOC Adds pre_dispatch

* DOC Adds permutation importance example

* Trigger CI

* BLD Adds inspect to configuration

* RFC Update to only inspect fitted model

* RFC Removes parameters

* ENH: Adds pandas support

* STY Flake8

* DOC Adds new permutation importance example

* ENH Renames module to model_inspection

* DOC Fix links

* DOC Fixes image link

* DOC Fixes image link

* DOC Spelling

* DOC

* TST Fix keyword

* Rework RF Imp vs Perm Imp example (#4)

* WIP

* WIP

* WIP

* DOC Adds multcollinear features example

* WIP

* DOC: Clean up docs

* TST Adds tests for strings

* STY Indent correction

* WIP

* ENH Uses check_X_y

* TST Adds test with strings

* STY Fix

* TST Adds column transformer to test

* CLN Address comments

* CLN Removes import

* TST Adds test with nan

* CLN Removes import

* ENH Parallel

* DOC comments

* ENH Better handling of pandas

* ENH Clear checking of pandas dataframe

* STY Formatting

* ENH Copies in parallel helper

* DOC Adds comments

* BUG Fix copying

* BUG Fix for pandas

* BUG Fix for pandas

* REV

* BLD Trigger CI

* BUG Fix

* BUG Fix

* TST Does this work

* BUG Fixes test

* BUG Fixes test

* BUG Fix

* BUG Fix

* BUG Fix

* STY Fix

* TST Fix

* TST Fix segfault

* CLN Address comments

* CLN Address comments

* ENH Returns a bunch

* STY Flake8

* CLN Renames bunch key

* DOC Updates api

* DOC Updates api

* TST Adds permutation test with linear_regression

* DOC update

* DOC Fix label cutoff

* CLN Address comments

* TST Adds test for random_state effect

* DOC Adds permutation importance

* DOC Adds ogrisel suggestion

* DOC Address guillaumes comments

* DOC Address andreas comments

* DOC Update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants