Saveable (Spark 3.5.5 JavaDoc) (original) (raw)
- All Known Implementing Classes:
BisectingKMeansModel, ChiSqSelectorModel, DecisionTreeModel, DistributedLDAModel, FPGrowthModel, GaussianMixtureModel, GradientBoostedTreesModel, IsotonicRegressionModel, KMeansModel, LassoModel, LDAModel, LinearRegressionModel, LocalLDAModel, LogisticRegressionModel, MatrixFactorizationModel, NaiveBayesModel, PowerIterationClusteringModel, PrefixSpanModel, RandomForestModel, RidgeRegressionModel, StreamingKMeansModel, SVMModel, Word2VecModel
public interface Saveable
Trait for models and transformers which may be saved as files. This should be inherited by the class which implements model instances.
Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method and Description void save(SparkContext sc, String path) Save this model to the given path. Method Detail
* #### save void save([SparkContext](../../../../../org/apache/spark/SparkContext.html "class in org.apache.spark") sc, String path) Save this model to the given path. This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/ The model may be loaded using `Loader.load`. Parameters: `sc` \- Spark context used to save model data. `path` \- Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.