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

rfe doesn't save recipe performance data #907

Open
topepo opened this issue Jul 2, 2018 · 0 comments
Open

rfe doesn't save recipe performance data #907

topepo opened this issue Jul 2, 2018 · 0 comments
Labels

Comments

@topepo
Copy link
Owner

topepo commented Jul 2, 2018

Currently:

modelPred <-
  rfeControl$functions$pred(fitObject, test_x[, retained, drop = FALSE])
if (is.data.frame(modelPred) | is.matrix(modelPred)) {
  if (is.matrix(modelPred)) {
    modelPred <- as.data.frame(modelPred)
    ## in the case where the function returns a matrix with a single column
    ## make sure that it is named pred
    if (ncol(modelPred) == 1)
      names(modelPred) <- "pred"
  }
  modelPred$obs <- test_y
  modelPred$Variables <- sizeValues[k]
} else
  modelPred <-
    data.frame(pred = modelPred,
               obs = test_y,
               Variables = sizeValues[k])

This should also merge in the perf_data df before saving. Or, do this outside of the workflow since the data is the same for each variable subset (within a resample)

@topepo topepo added the bug label Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant