Class SmileRegressor

java.lang.Object
org.apache.spark.ml.PipelineStage
org.apache.spark.ml.Estimator<SmileRegressionModel>
org.apache.spark.ml.Predictor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel>
org.apache.spark.ml.regression.Regressor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel>
smile.spark.SmileRegressor
All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, org.apache.spark.ml.param.Params, org.apache.spark.ml.param.shared.HasFeaturesCol, org.apache.spark.ml.param.shared.HasLabelCol, org.apache.spark.ml.param.shared.HasPredictionCol, org.apache.spark.ml.PredictorParams, org.apache.spark.ml.util.Identifiable, org.apache.spark.ml.util.MLWritable

public class SmileRegressor extends org.apache.spark.ml.regression.Regressor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel> implements org.apache.spark.ml.util.MLWritable
A Spark ML Estimator that trains a SMILE regression model.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Functional interface for training a SMILE regression model on double feature arrays.

    Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging

    org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor with a random UID.
    Constructor with a custom UID.
  • Method Summary

    Modifier and Type
    Method
    Description
    copy(org.apache.spark.ml.param.ParamMap extra)
     
    Returns the trainer function.
    load(String path)
    Loads a persisted SmileRegressor from the given path.
    static org.apache.spark.ml.util.MLReader<SmileRegressor>
    Returns an MLReader instance to load a persisted SmileRegressor.
    Sets the trainer function.
    train(org.apache.spark.sql.Dataset<?> dataset)
     
    uid()
     
    org.apache.spark.ml.util.MLWriter
     

    Methods inherited from class org.apache.spark.ml.Predictor

    featuresCol, featuresDataType, fit, getFeaturesCol, getLabelCol, getPredictionCol, labelCol, org$apache$spark$ml$param$shared$HasFeaturesCol$_setter_$featuresCol_$eq, org$apache$spark$ml$param$shared$HasLabelCol$_setter_$labelCol_$eq, org$apache$spark$ml$param$shared$HasPredictionCol$_setter_$predictionCol_$eq, predictionCol, setFeaturesCol, setLabelCol, setPredictionCol, transformSchema, validateAndTransformSchema

    Methods inherited from class org.apache.spark.ml.Estimator

    estimateModelSize, fit, fit, fit, fit

    Methods inherited from class org.apache.spark.ml.PipelineStage

    $, clear, copyValues, copyValues$default$2, defaultCopy, defaultParamMap, estimateMatadataSize, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isDefined, isSet, 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, onParamChange, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$ml$param$Params$_setter_$defaultParamMap_$eq, org$apache$spark$ml$param$Params$_setter_$paramMap_$eq, paramMap, params, set, set, set, setDefault, setDefault, toString, transformSchema, withLogContext

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.spark.ml.util.Identifiable

    toString

    Methods inherited from interface org.apache.spark.ml.util.MLWritable

    save

    Methods inherited from interface org.apache.spark.ml.param.Params

    $, clear, copyValues, copyValues$default$2, defaultCopy, defaultParamMap, estimateMatadataSize, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, org$apache$spark$ml$param$Params$_setter_$defaultParamMap_$eq, org$apache$spark$ml$param$Params$_setter_$paramMap_$eq, paramMap, params, set, set, set, setDefault, setDefault
  • Constructor Details

    • SmileRegressor

      public SmileRegressor()
      Default constructor with a random UID.
    • SmileRegressor

      public SmileRegressor(String uid)
      Constructor with a custom UID.
      Parameters:
      uid - the instance UID.
  • Method Details

    • uid

      public String uid()
      Specified by:
      uid in interface org.apache.spark.ml.util.Identifiable
    • getTrainer

      public SmileRegressor.Trainer getTrainer()
      Returns the trainer function.
      Returns:
      the trainer function.
    • setTrainer

      public SmileRegressor setTrainer(SmileRegressor.Trainer trainer)
      Sets the trainer function.
      Parameters:
      trainer - the trainer function.
      Returns:
      this estimator.
    • copy

      public SmileRegressor copy(org.apache.spark.ml.param.ParamMap extra)
      Specified by:
      copy in interface org.apache.spark.ml.param.Params
      Specified by:
      copy in class org.apache.spark.ml.Predictor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel>
    • train

      public SmileRegressionModel train(org.apache.spark.sql.Dataset<?> dataset)
      Specified by:
      train in class org.apache.spark.ml.Predictor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel>
    • write

      public org.apache.spark.ml.util.MLWriter write()
      Specified by:
      write in interface org.apache.spark.ml.util.MLWritable
    • read

      public static org.apache.spark.ml.util.MLReader<SmileRegressor> read()
      Returns an MLReader instance to load a persisted SmileRegressor.
      Returns:
      the reader.
    • load

      public static SmileRegressor load(String path)
      Loads a persisted SmileRegressor from the given path.
      Parameters:
      path - the path.
      Returns:
      the loaded estimator.