Package org.apache.spark.ml.util
Class MLWriter
Object
org.apache.spark.ml.util.MLWriter
- All Implemented Interfaces:
- org.apache.spark.internal.Logging,- BaseReadWrite
- Direct Known Subclasses:
- ChiSqSelectorModel.ChiSqSelectorModelWriter,- CrossValidatorModel.CrossValidatorModelWriter,- GeneralMLWriter,- TrainValidationSplitModel.TrainValidationSplitModelWriter
public abstract class MLWriter
extends Object
implements BaseReadWrite, org.apache.spark.internal.Logging
Abstract class for utility classes that can save ML instances in Spark's internal format.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.spark.internal.Loggingorg.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAdds an option to the underlying MLWriter.Overwrites if the output path already exists.voidSaves the ML instances to the input path.session(SparkSession sparkSession) Sets the Spark Session to use for saving/loading.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.spark.ml.util.BaseReadWritesc, sparkSession, sqlContextMethods inherited from interface org.apache.spark.internal.LogginginitializeForcefully, 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- 
MLWriterpublic MLWriter()
 
- 
- 
Method Details- 
optionAdds 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)
 
- 
overwriteOverwrites if the output path already exists.- Returns:
- (undocumented)
 
- 
saveSaves the ML instances to the input path.- Parameters:
- path- (undocumented)
- Throws:
- IOException
 
- 
sessionDescription copied from interface:BaseReadWriteSets the Spark Session to use for saving/loading.- Specified by:
- sessionin interface- BaseReadWrite
- Parameters:
- sparkSession- (undocumented)
- Returns:
- (undocumented)
 
 
-