[Python] Implement R model in Python

Discussão em 'Python' iniciado por Stack, Maio 14, 2025.

  1. Stack

    Stack Membro Participativo

    How can I implement a GAM model developed in R (using mgcv) in Python using statsmodels library. The model in R is:

    gam_model<- gam(y ~ var1 + var2 + var1:var2 + s(var1, bs="re", by = var2), data = df, family = nb, weights = var2))


    By implementing it I mean I want to replicate the model to do both the training and predictions in Python.

    Continue reading...

Compartilhe esta Página