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 ClassesModifier and TypeClassDescriptionstatic interfaceFunctional 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
ConstructorsConstructorDescriptionDefault constructor with a random UID.SmileRegressor(String uid) Constructor with a custom UID. -
Method Summary
Modifier and TypeMethodDescriptioncopy(org.apache.spark.ml.param.ParamMap extra) Returns the trainer function.static SmileRegressorLoads a persisted SmileRegressor from the given path.static org.apache.spark.ml.util.MLReader<SmileRegressor> read()Returns an MLReader instance to load a persisted SmileRegressor.setTrainer(SmileRegressor.Trainer trainer) Sets the trainer function.train(org.apache.spark.sql.Dataset<?> dataset) uid()org.apache.spark.ml.util.MLWriterwrite()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, validateAndTransformSchemaMethods inherited from class org.apache.spark.ml.Estimator
estimateModelSize, fit, fit, fit, fitMethods 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, withLogContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.spark.ml.util.Identifiable
toStringMethods inherited from interface org.apache.spark.ml.util.MLWritable
saveMethods 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
Constructor with a custom UID.- Parameters:
uid- the instance UID.
-
-
Method Details
-
uid
- Specified by:
uidin interfaceorg.apache.spark.ml.util.Identifiable
-
getTrainer
Returns the trainer function.- Returns:
- the trainer function.
-
setTrainer
Sets the trainer function.- Parameters:
trainer- the trainer function.- Returns:
- this estimator.
-
copy
- Specified by:
copyin interfaceorg.apache.spark.ml.param.Params- Specified by:
copyin classorg.apache.spark.ml.Predictor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel>
-
train
- Specified by:
trainin classorg.apache.spark.ml.Predictor<org.apache.spark.ml.linalg.Vector, SmileRegressor, SmileRegressionModel>
-
write
public org.apache.spark.ml.util.MLWriter write()- Specified by:
writein interfaceorg.apache.spark.ml.util.MLWritable
-
read
Returns an MLReader instance to load a persisted SmileRegressor.- Returns:
- the reader.
-
load
Loads a persisted SmileRegressor from the given path.- Parameters:
path- the path.- Returns:
- the loaded estimator.
-