TheRajVJain
TheRajVJain

Reputation: 399

gam fails with the error - "inner loop 3; can't correct step size"

I am using the mgcv package to train a gam model (family = betar(), method = 'REML' using 10 threads). I use the tp basis.

I split my dataset in multiple train-test splits - my main interest is prediction (rather than inference). Only on some of the splits, I get the following error

Error in gam.fit4(x, y, sp, Eb, UrS = UrS, weights = weights, start = start,  :
 inner loop 3; can't correct step size

A simple online search showed that this error is related to glm (I know that REML casts the gam as a large glm, hence the plausibility of the error). But, many of the online solutions are customised to that particular problem statement. I am not sure what additional information is required here. Happy to provide whatever is needed.

PS: I am running the R environment inside a python process through rpy2 library.

Upvotes: 0

Views: 70

Answers (0)

Related Questions