MLReader (Spark 3.5.5 JavaDoc) (original) (raw)
Object
- org.apache.spark.ml.util.MLReader
Type Parameters:
T
- ML instance type
All Implemented Interfaces:
BaseReadWrite
public abstract class MLReader
extends Object
implements BaseReadWrite
Abstract class for utility classes that can load ML instances.
Constructor Summary
Constructors
Constructor and Description MLReader() Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
Modifier and Type Method and Description abstract T load(String path) Loads the ML component from the input path. MLReader<T> session(SparkSession sparkSession) Sets the Spark Session to use for saving/loading. * ### Methods inherited from class Object `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait` * ### Methods inherited from interface org.apache.spark.ml.util.[BaseReadWrite](../../../../../org/apache/spark/ml/util/BaseReadWrite.html "interface in org.apache.spark.ml.util") `[sc](../../../../../org/apache/spark/ml/util/BaseReadWrite.html#sc--), [sparkSession](../../../../../org/apache/spark/ml/util/BaseReadWrite.html#sparkSession--), [sqlContext](../../../../../org/apache/spark/ml/util/BaseReadWrite.html#sqlContext--)`
Constructor Detail
* #### MLReader public MLReader()
Method Detail
* #### load public abstract [T](../../../../../org/apache/spark/ml/util/MLReader.html "type parameter in MLReader") load(String path) Loads the ML component from the input path. Parameters: `path` \- (undocumented) Returns: (undocumented) * #### session public [MLReader](../../../../../org/apache/spark/ml/util/MLReader.html "class in org.apache.spark.ml.util")<[T](../../../../../org/apache/spark/ml/util/MLReader.html "type parameter in MLReader")> session([SparkSession](../../../../../org/apache/spark/sql/SparkSession.html "class in org.apache.spark.sql") sparkSession) Sets the Spark Session to use for saving/loading. Specified by: `[session](../../../../../org/apache/spark/ml/util/BaseReadWrite.html#session-org.apache.spark.sql.SparkSession-)` in interface `[BaseReadWrite](../../../../../org/apache/spark/ml/util/BaseReadWrite.html "interface in org.apache.spark.ml.util")` Parameters: `sparkSession` \- (undocumented) Returns: (undocumented)