Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

pqz317
Copy link
Member

@pqz317 pqz317 commented Apr 5, 2023

  • add design matrix logic in data_utils.py
  • example for how to create matrix in create_design_matrix.ipynb

@pqz317 pqz317 requested review from eywalker and pckuo April 5, 2023 00:29
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

constants.py Outdated Show resolved Hide resolved
data_utils.py Outdated Show resolved Hide resolved
@pqz317 pqz317 requested a review from eywalker April 6, 2023 18:15
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
pattern = row[f"Item{item_chosen}Pattern"]

chosen_time = row["FeedbackOnset"] - 800
chosen_bin = int(chosen_time / bin_size)
Copy link
Member

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)

Copy link
Member Author

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

wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Show resolved Hide resolved
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Show resolved Hide resolved
@pqz317 pqz317 requested a review from eywalker April 11, 2023 19:15
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
wcst_encode/data_utils.py Outdated Show resolved Hide resolved
@pqz317 pqz317 requested a review from eywalker April 11, 2023 21:23
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.

None yet

2 participants