Open dsweber2 opened 11 months ago
Really, this may or may not be a problem depending on the engine. With lm()
, when X
has more than 1 constant column, the associated coefficients will be NA
but prediction is possible. glmnet()
silently ignores them and estimates their coefficients to be 0.
On the other hand, if y = constant
, then lm()
will run, but glmnet()
errors out.
This needs a reprex showing where / when it fails.
Additionally, erroring out here may well be desirable, depending on the message. The goal of epipredict
is not to "always give predictions". If there's a problem with the data, the user should be told.
This is possibly more a problem with parsnip, but not being able to predict a literally flat value is not great.