GeneralMLWriter#
- classpyspark.ml.util.GeneralMLWriter[source]#
Utility class that can save ML instances in different formats.
New in version 2.4.0.
Methods
format(source)Specifies the format of ML export ("pmml", "internal", or the fully qualified class name for export).
option(key, value)Adds an option to the underlying MLWriter.
Overwrites if the output path already exists.
save(path)Save the ML instance to the input path.
saveImpl(path)save() handles overwriting and then calls this method.
session(sparkSession)Sets the Spark Session to use for saving/loading.
Attributes
Returns the underlyingSparkContext.
Returns the user-specified Spark Session or the default.
Methods Documentation
- format(source)[source]#
Specifies the format of ML export (“pmml”, “internal”, or the fully qualified classname for export).
- option(key,value)#
Adds an option to the underlying MLWriter. See the documentation for the specific model’swriter for possible options. The option name (key) is case-insensitive.
- overwrite()#
Overwrites if the output path already exists.
- save(path)#
Save the ML instance to the input path.
- saveImpl(path)#
save() handles overwriting and then calls this method. Subclasses should override thismethod to implement the actual saving of the instance.
- session(sparkSession)#
Sets the Spark Session to use for saving/loading.
Attributes Documentation
- sc#
Returns the underlyingSparkContext.
- sparkSession#
Returns the user-specified Spark Session or the default.