-
Notifications
You must be signed in to change notification settings - Fork 4
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
Logic for design matrix creation #6
base: main
Are you sure you want to change the base?
Conversation
pqz317
commented
Apr 5, 2023
•
edited
Loading
edited
- add design matrix logic in data_utils.py
- example for how to create matrix in create_design_matrix.ipynb
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
wcst_encode/data_utils.py
Outdated
pattern = row[f"Item{item_chosen}Pattern"] | ||
|
||
chosen_time = row["FeedbackOnset"] - 800 | ||
chosen_bin = int(chosen_time / bin_size) |
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.
generally best to be explicit with things like np.ceil
and np.floor
(here it is np.floor
)
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.
changed, here and elsewhere though, I often to need to cast as well, so it will be int(np.floor(chosen_time / bin_size))
as long as that doesn't feel redundant