Repository navigation
Conversation
mschrimpf
left a comment
There was a problem hiding this comment.
yes the skeleton looks good 👍
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
|
Do I need to make any more changes to |
mschrimpf
left a comment
There was a problem hiding this comment.
yes, see below for comments. If you can avoid positional indexing (e.g. features[0]), indexing via metadata is generally preferred (example in suggestions).
You should also add unit tests to make sure the code actually does what you expect. See https://github.com/brain-score/model-tools/blob/master/tests/brain_transformation/test_behavior.py#L47 for examples
|
@mschrimpf thank you for the input. I actually meant if there is anything left to do in |
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
Co-authored-by: Martin Schrimpf <[email protected]>
no, I don't think so |
| return choices | ||
|
|
||
| def unique_stimuli(self, triplets): | ||
| """Returns a dataframe with unique stimuli.""" |
There was a problem hiding this comment.
The numpy and pandas functions didn't work directly. Do you have any ideas here?
There was a problem hiding this comment.
what do you mean by "didn't work directly"? np.unique should give you the unique stimulus ids.
I'm guessing you could just use triplets.drop_duplicates() (http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html)
There was a problem hiding this comment.
I don't remember exactly but there was an error like: ...Error: StimulusSet doesn't have ... unique. I will look at this again once we wrap up the data PR.
| return choices | ||
|
|
||
| def unique_stimuli(self, triplets): | ||
| """Returns a dataframe with unique stimuli.""" |
There was a problem hiding this comment.
what do you mean by "didn't work directly"? np.unique should give you the unique stimulus ids.
I'm guessing you could just use triplets.drop_duplicates() (http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html)
Co-authored-by: Martin Schrimpf <[email protected]>
Hello @mschrimpf,
I started implementing the task in the behavior.py file and I linked it to the init.py file.
I would be happy if you could have a look at it.
Best,
Linus