Class Model<M extends Model<M>>

Type Parameters:
M - model type
All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, Params, Identifiable, scala.Serializable
Direct Known Subclasses:
ALSModel, BisectingKMeansModel, BucketedRandomProjectionLSHModel, Bucketizer, ChiSqSelectorModel, CountVectorizerModel, CrossValidatorModel, FPGrowthModel, GaussianMixtureModel, IDFModel, ImputerModel, IsotonicRegressionModel, KMeansModel, LDAModel, MaxAbsScalerModel, MinHashLSHModel, MinMaxScalerModel, OneHotEncoderModel, OneVsRestModel, PCAModel, PipelineModel, PredictionModel, RFormulaModel, RobustScalerModel, StandardScalerModel, StringIndexerModel, TrainValidationSplitModel, UnivariateFeatureSelectorModel, VarianceThresholdSelectorModel, VectorIndexerModel, Word2VecModel

public abstract class Model<M extends Model<M>> extends Transformer
A fitted model, i.e., a Transformer produced by an Estimator.

See Also:
  • Constructor Details

    • Model

      public Model()
  • Method Details

    • copy

      public abstract M copy(ParamMap extra)
      Description copied from interface: Params
      Creates a copy of this instance with the same UID and some extra params. Subclasses should implement this method and set the return type properly. See defaultCopy().
      Specified by:
      copy in interface Params
      Specified by:
      copy in class Transformer
      Parameters:
      extra - (undocumented)
      Returns:
      (undocumented)
    • hasParent

      public boolean hasParent()
      Indicates whether this Model has a corresponding parent.
    • parent

      public Estimator<M> parent()
      The parent estimator that produced this model.
      Returns:
      (undocumented)
      Note:
      For ensembles' component Models, this value can be null.
    • setParent

      public M setParent(Estimator<M> parent)
      Sets the parent of this model (Java API).
      Parameters:
      parent - (undocumented)
      Returns:
      (undocumented)