Package org.apache.spark.mllib.util
Interface Loader<M extends Saveable>
public interface Loader<M extends Saveable>
Trait for classes which can load models and transformers from files.
This should be inherited by an object paired with the model class.
-
Method Summary
Modifier and TypeMethodDescriptionload
(SparkContext sc, String path) Load a model from the given path.
-
Method Details
-
load
Load a model from the given path.The model should have been saved by
Saveable.save
.- Parameters:
sc
- Spark context used for loading model files.path
- Path specifying the directory to which the model was saved.- Returns:
- Model instance
-