
Gets the value of featuresCol or its default value. Merged param map fit ( dataset, params = None ) ¶ Values, and then merges them with extra values from input intoĪ flat param map, where the latter value is used if there existĬonflicts, i.e., with ordering: default param values < extractParamMap ( extra = None ) ¶Įxtracts the embedded default param values and user-supplied Returns the documentation of all params with their optionallyĭefault values and user-supplied values. Parameters : extra dict, optionalĮxtra parameters to copy to the new instance Returns : JavaParamsĬopy of this instance explainParam ( param ) ¶Įxplains a single param and returns its name, doc, and optionalĭefault value and user-supplied value in a string. So both the Python wrapper and the Java pipelineĬomponent get copied. Then make a copy of the companion Java pipeline component withĮxtra params. copy ( extra = None ) ¶Ĭreates a copy of this instance with the same uid and someĮxtra params. Returns an MLWriter instance for this ML instance.Ĭlears a param from the param map if it has been explicitly set. Sets a parameter in the embedded param map. Save this ML instance to the given path, a shortcut of ‘write().save(path)’. Returns an MLReader instance for this class. Reads an ML instance from the input path, a shortcut of read().load(path). Tests whether this instance contains a param with a given (string) name.Ĭhecks whether a param is explicitly set by user or has a default value.Ĭhecks whether a param is explicitly set by user. Gets the value of weightCol or its default value.Ĭhecks whether a param has a default value. Gets the value of tol or its default value. Gets the value of standardization or its default value. Gets the value of solver or its default value. Gets the value of regParam or its default value. Gets the value of predictionCol or its default value. Gets the value of a param in the user-supplied param map or its default value. Gets the value of maxIter or its default value. Gets the value of maxBlockSizeInMB or its default value. Gets the value of loss or its default value. Gets the value of labelCol or its default value. Gets the value of fitIntercept or its default value. Gets the value of epsilon or its default value. Gets the value of elasticNetParam or its default value. Gets the value of aggregationDepth or its default value. Returns the documentation of all params with their optionally default values and user-supplied values.Įxtracts the embedded default param values and user-supplied values, and then merges them with extra values from input into a flat param map, where the latter value is used if there exist conflicts, i.e., with ordering: default param values < user-supplied values < extra.įits a model to the input dataset with optional parameters.įits a model to the input dataset for each param map in paramMaps. save ( model_path + "_2" )Ĭlears a param from the param map if it has been explicitly set.Ĭreates a copy of this instance with the same uid and some extra params.Įxplains a single param and returns its name, doc, and optional default value and user-supplied value in a string. save ( model_path ) > model2 = LinearRegressionModel. getMaxIter () 5 > model_path = temp_path + "/lr_model" > model. save ( lr_path ) > lr2 = LinearRegression. setParams ( featuresCol = "vector" ) LinearRegression. createDataFrame (, ),)], ) > abs ( model. newPrediction - ( - 1.0 )) > abs ( model. getMaxBlockSizeInMB () 0.0 > test0 = spark. setPredictionCol ( "newPrediction" ) LinearRegressionModel. setFeaturesCol ( "features" ) LinearRegressionModel. createDataFrame (, ))], ) > lr = LinearRegression ( regParam = 0.0, solver = "normal", weightCol = "weight" ) > lr. from pyspark.ml.linalg import Vectors > df = spark.
