def _toSKLGLM(self, model, is_classifier):
py_cls = type(model)<EOL>skl_cls = self._spark2skl_classes[py_cls]<EOL>intercept = model.intercept<EOL>weights = model.coefficients<EOL>skl = skl_cls()<EOL>skl.intercept_ = np.float64(intercept)<EOL>skl.coef_ = weights.toArray().reshape(<NUM_LIT:1>, -<NUM_LIT:1>)<EOL>if is_classifier:<EOL><INDENT>skl.classes_ = np.array([<NUM_LIT:0>, <NUM_LIT:1>])<EOL><DEDENT>return skl<EOL>
Private method for converting a GLM to a scikit-learn model
        TODO: Add model parameters as well.