Document details on null_model
https://parsnip.tidymodels.org/reference/null_model.html
There are several different plausible null models. For classification, besides predicting the majority class, there is also uniform random guessing, and selecting a class from a random input observation. See https://machinelearningmastery.com/how-to-develop-and-evaluate-naive-classifier-strategies-using-probability/
I'm not saying these need to be supported, but I had to look into the source code to see what is actually being fit. The source code clearly says "Fit a single mean or largest class model.", so this should be documented.
Hello @jxu 👋
thanks for raising this issue, the documentation is indeed quite sparse
I can open a PR if you'd like. I assume https://github.com/tidymodels/parsnip/blob/907d2164a093f10cbbc1921e4b73264ca4053f6b/R/nullmodel.R#L1 is for nullmodel while https://github.com/tidymodels/parsnip/blob/907d2164a093f10cbbc1921e4b73264ca4053f6b/R/nullmodel.R#L128 is for null_model? The naming is a bit confusing.
it is for the second one! https://github.com/tidymodels/parsnip/blob/HEAD/R/nullmodel.R#L128-L145
Yes the naming is a pain, but this is the only model that is define inside a parsnip package and making the names work with dispatch caused a bit of trouble.
if you are up for a PR go ahead!
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.