def toSpark(self, model):
if isinstance(model, SKL_LogisticRegression) or isinstance(model, SKL_LinearRegression):<EOL><INDENT>return self._toSparkGLM(model)<EOL><DEDENT>else:<EOL><INDENT>supported_types = map(lambda t: type(t), self._supported_skl_types)<EOL>raise ValueError("<STR_LIT>" %<EOL>(type(model), "<STR_LIT:U+002CU+0020>".join(supported_types)))<EOL><DEDENT>
Convert a scikit-learn model to a Spark ML model from the Pipelines API (spark.ml).
Currently supported models:
- sklearn.linear_model.LogisticRegression (binary classification only, not multiclass)
- sklearn.linear_model.LinearRegression

:param model: scikit-learn model
:return: Spark ML model with equivalent predictive behavior.
         Currently, parameters or arguments for training are not copied.