Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

List-like test_spec behavior broken in benchmark function #161

Closed
utf opened this issue Jan 15, 2019 · 1 comment
Closed

List-like test_spec behavior broken in benchmark function #161

utf opened this issue Jan 15, 2019 · 1 comment

Comments

@utf
Copy link
Member

utf commented Jan 15, 2019

Passing a list-like object as test_spec in the MatPipe.benchmark function does not produce the correct behavior.

Specifically, this line is the issue:

traindf = df.iloc[~np.asarray(test_spec)]

After some testing I've realized you cannot use ~ and iloc in that combination.

E.g.:

# load dataframe
len(df)
> 174

len(df.iloc[np.asarray([1, 2, 3, 4])])
> 4

len(df.iloc[~np.asarray([1, 2, 3, 4])])
> 4

In that last case you would expect an output of 170. E.g. all structures except the testing set.

I have a fix for this inbound.

@ardunn
Copy link
Contributor

ardunn commented Jan 26, 2019

closed by commits leading up to ce2245c

@ardunn ardunn closed this as completed Jan 26, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants