-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MRG: implement ResidualizeTarget #11
base: master
Are you sure you want to change the base?
Conversation
You also need to few tests corresponding to this class! |
|
|
||
in_targets = check_array(in_targets) | ||
confounds = check_array(confounds, ensure_2d=False) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add checks for data type to ensure it is numeric
|
||
check_is_fitted(self, 'model_', 'n_targets_') | ||
test_targets = check_array(test_targets, accept_sparse=True) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add another data type check
confounds/base.py
Outdated
Parameters | ||
---------- | ||
X : {array-like, sparse matrix}, shape (n_samples, n_targets) | ||
The training input samples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it clear X is targets here, although it is called X
max_dim = 100 | ||
for n_samples in np.random.randint(0, 20, 1): | ||
for num_confounds in np.random.randint(min_dim, max_dim, 3): | ||
train_all, _ = make_sparse_uncorrelated( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not generate discrete numerical/integer values! We need a way to broaden the test with multiple data types!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a bit confused here, does this look better? np.random.randint(0, 20, 1, dtype=int)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before updating the tests, how about you try making a jupyter notebook, and play with this class, and write some examples, to see how it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @raamana sorry for the late response. this summer has been a bit crazy. probably need more time-out here. i noticed that some repos have been snapshotted in Arctic Code Vault, i guess it didn't snapshot PR :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP, take your time. Happy to chat with you to discuss this and make a more precise plan to finish it quickly.
why are you referencing the Arctic Code Vault? did you lose your fork or what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! i'm wondering if the snapshot in Arctic Code Vault would include PR? and no, i didn't lose forks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know - but I am sure your contribution will be clearly recognized :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @zuxfoucault, would you have time this year to work on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry I just saw this.
implement ResidualizeTarget at HBM brainhack