Package org.apache.spark.ml.util
Class MLWriter
Object
org.apache.spark.ml.util.MLWriter
- All Implemented Interfaces:
org.apache.spark.internal.Logging,org.apache.spark.ml.util.BaseReadWrite
- Direct Known Subclasses:
ChiSqSelectorModel.ChiSqSelectorModelWriter,CrossValidatorModel.CrossValidatorModelWriter,GeneralMLWriter,TrainValidationSplitModel.TrainValidationSplitModelWriter
public abstract class MLWriter
extends Object
implements org.apache.spark.ml.util.BaseReadWrite, org.apache.spark.internal.Logging
Abstract class for utility classes that can save ML instances in Spark's internal format.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging
org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.ml.util.BaseReadWrite
org$apache$spark$ml$util$BaseReadWrite$$optionSparkSession, org$apache$spark$ml$util$BaseReadWrite$$optionSparkSession_$eq, sc, sparkSession, sqlContextMethods inherited from interface org.apache.spark.internal.Logging
initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logBasedOnLevel, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, MDC, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext
-
Constructor Details
-
MLWriter
public MLWriter()
-
-
Method Details
-
option
Adds an option to the underlying MLWriter. See the documentation for the specific model's writer for possible options. The option name (key) is case-insensitive.- Parameters:
key- (undocumented)value- (undocumented)- Returns:
- (undocumented)
-
overwrite
Overwrites if the output path already exists.- Returns:
- (undocumented)
-
save
Saves the ML instances to the input path.- Parameters:
path- (undocumented)- Throws:
IOException
-
session
- Specified by:
sessionin interfaceorg.apache.spark.ml.util.BaseReadWrite
-