sl3 icon indicating copy to clipboard operation
sl3 copied to clipboard

Lrnr_glm family argument

Open kmishra9 opened this issue 5 years ago • 1 comments

Hey there,

A quick suggestion would be to either

  1. mention that Lrnr_glm$train() calls glm.fit(), rather than glm() or
  2. mention that the family = ... argument accepted by glm.fit() and thus sl3 is required to be "the result of a call to a family function" (i.e. guassian()). When I tried to use family="gaussian" and family=guassian in a lrnr_glm$train() call, I ran into an error that took some time to hunt down.
> lrnr_glm = make_learner(learner_class = Lrnr_glm, family = "gaussian")
> lrnr_glm$train(train_task)
Failed on Lrnr_glm_TRUE_gaussian
Error: $ operator is invalid for atomic vectors

and

> lrnr_glm = make_learner(learner_class = Lrnr_glm, family = gaussian)
> lrnr_glm$train(train_task)
Failed on Lrnr_glm_TRUE
Error in args$family$family : object of type 'closure' is not subsettable

kmishra9 avatar Aug 07 '19 00:08 kmishra9

Also making a note to add language indicating that by default family is set automatically from the outcome variable type

jeremyrcoyle avatar Aug 07 '19 19:08 jeremyrcoyle