business-science / gammodels

The parsnip backend for GAM Models.
https://business-science.github.io/gammodels/
Other
7 stars 3 forks source link

First Version Classification Mode #6

Closed AlbertoAlmuinha closed 3 years ago

AlbertoAlmuinha commented 3 years ago

Hi @mdancho84 ,

I have created the first version of the binary classification and have been testing to extend it to more categories from the multinom() family but have not been able to. I think we should open an issue in parsnip to see how we can make that kind of structures pass through parsnip::fit().

Example:

mpg <- ggplot2::mpg
mpg$cyl <- as.numeric(as.factor(mpg$cyl))-1

mgcv::gam(list(cyl ~ s(cty), ~ s(cty), ~s(cty)), 
          family = multinom(K=3), 
          data = mpg)

I have also put some tests for both regression and classification and I have added in the description in suggestions the stats package, as it is the one that contains many of the families that will be used for modeling.