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

outcome_type is meaningless to Lrnr_glm_fast learner #93

Closed
osofr opened this issue Nov 11, 2017 · 1 comment
Closed

outcome_type is meaningless to Lrnr_glm_fast learner #93

osofr opened this issue Nov 11, 2017 · 1 comment

Comments

@osofr
Copy link
Collaborator

osofr commented Nov 11, 2017

All attempts give an error. Perhaps we should add this to test set once we figured out what is causing this. Seems like the same issue is true for Lrnr_glm, not sure if all learners are affected though.

  data(cpp_imputed)
  cpp_haz_01range <- cpp_imputed
  cpp_haz_01range[["haz_01range"]] <- rep_len(c(0.1, 0.9), nrow(cpp_imputed))
  task_01range <- sl3_Task$new(cpp_haz_01range, covariates = covars, outcome = "haz_01range")
  fglm_learner <- Lrnr_glm_fast$new(outcome_type = "continuous")
  fglm_learner$train(task_01range)

Failed on Lrnr_glm_fast_TRUE_Cholesky_continuous
Error in outcome_type$glm_family : 
  $ operator is invalid for atomic vectors

  fglm_learner <- Lrnr_glm_fast$new(outcome_type = "binomial")
  fglm_learner$train(task_01range)

Failed on Lrnr_glm_fast_TRUE_Cholesky_binomial
Error in outcome_type$glm_family : 
  $ operator is invalid for atomic vectors

  fglm_learner <- Lrnr_glm_fast$new(outcome_type = "quasibinomial")
  fglm_learner$train(task_01range)

Failed on Lrnr_glm_fast_TRUE_Cholesky_quasibinomial
Error in outcome_type$glm_family : 
  $ operator is invalid for atomic vectors
@osofr
Copy link
Collaborator Author

osofr commented Nov 11, 2017

Per @jeremy

this line: https://github.com/jeremyrcoyle/sl3/blob/master/R/sl3_Task.R#L63
needs to be added to this function: https://github.com/jeremyrcoyle/sl3/blob/master/R/Lrnr_base.R#L45
for the outcome_type as character to be converted to the outcome_type object

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

No branches or pull requests

2 participants