Comparei os modelos de regressão logística em R ( glm
) e Spark (LogisticRegressionWithLBFGS
) em um conjunto de dados de 390 obs. de 14 variáveis.
Os resultados são completamente diferentes na interceptação e nos pesos. Como explicar isso?
Aqui estão os resultados do Spark (LogisticRegressionWithLBFGS):
model.intercept :
1.119830027739959
model.weights :
GEST 0.30798496002530473
DILATE 0.28121771009716895
EFFACE 0.01780105068588628
CONSIS -0.22782058111362183
CONTR -0.8094592237248102
MEMBRAN-1.788173534959893
AGE -0.05285751197750732
STRAT -1.6650305527536942
GRAVID 0.38324952943210994
PARIT -0.9463956993328745
DIAB 0.18151162744507293
TRANSF -0.7413500749909346
GEMEL 1.5953124037323745
Aqui está o resultado de R:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.0682091 3.3944407 0.904 0.366052
GEST 0.0086545 0.1494487 0.058 0.953821
DILATE 0.4898586 0.2049361 2.390 0.016835 *
EFFACE 0.0131834 0.0059331 2.222 0.026283 *
CONSIS 0.1598426 0.2332670 0.685 0.493196
CONTR 0.0008504 0.5788959 0.001 0.998828
MEMBRAN -1.5497870 0.4215416 -3.676 0.000236 ***
AGE -0.0420145 0.0326184 -1.288 0.197725
STRAT -0.3781365 0.5860476 -0.645 0.518777
GRAVID 0.1866430 0.1522925 1.226 0.220366
PARIT -0.6493312 0.2357530 -2.754 0.005882 **
DIAB 0.0335458 0.2163165 0.155 0.876760
TRANSF -0.6239330 0.3396592 -1.837 0.066219 .
GEMEL 2.2767331 1.0995245 2.071 0.038391 *
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1