Should Python's
statsmodels.api.GLM(train_y, train_X, family=sm.families.Binomial()).fit().predict(test_X)
always produce the same results as R's
predict(glm(y ~ ., data=train_X, family=binomial), newdata=test)
where train_y
is a pandas DataFrame
containing the y
column in the corresponding R data.frame
, train
; and where test_X
and train_X
are dataframes containing the remaining columns from the test
and train
dataframes respectively?
If not, are there parameters that I can supply to statsmodels
's GLM
to make it produce the same results as R's glm
?
params
. $\endgroup$