sl3
sl3 copied to clipboard
Lrnr_glm family argument
Hey there,
A quick suggestion would be to either
- mention that
Lrnr_glm$train()
callsglm.fit()
, rather thanglm()
or - mention that the
family = ...
argument accepted byglm.fit()
and thussl3
is required to be "the result of a call to a family function" (i.e.guassian()
). When I tried to usefamily="gaussian"
andfamily=guassian
in alrnr_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
Also making a note to add language indicating that by default family is set automatically from the outcome variable type