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

Fix bug in resampling when using predict = "train" (#1284) #1315

Merged
merged 5 commits into from
Oct 31, 2016

Conversation

MariaErdmann
Copy link
Contributor

suggestion for NEWS:

## Bug fixes
* fixed bug issued in #1284, a bug in resample when using predict = "train"

@larskotthoff
Copy link
Sponsor Member

Thanks. Do the tests cover the case that you reported in the issue?

@MariaErdmann
Copy link
Contributor Author

Do the tests cover the case that you reported in the issue?

I checked again and recognized I missed checking for predict.type and threshold.

I thought I check whether the entries in <resample.object>$pred for threshold and predict.type are not NULL which caused this error

Error in as.data.frame.default(x) : 
  cannot coerce class "c("ResamplePrediction", "NULL")" to a data.frame

and then I check whether there are entries in time which are not NA to catch this warning

In mean.default(x$time) : argument is not numeric or logical: returning NA

Moreover, I check whether the task description in the <resample.object>$pred is the same as the passed one.

@larskotthoff
Copy link
Sponsor Member

Thanks, merging.

@larskotthoff larskotthoff merged commit 4dbec91 into master Oct 31, 2016
@larskotthoff larskotthoff deleted the fix.1284 branch October 31, 2016 16:42
larskotthoff pushed a commit that referenced this pull request Oct 31, 2016
@giuseppec
Copy link
Contributor

@MariaErdmann don't forget to open up a new PR for the things we discussed and shortly summarize them.

@MariaErdmann
Copy link
Contributor Author

@giuseppec : Yes, thank you, see #1324 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants