Package org.apache.spark.ml.regression
Interface GeneralizedLinearRegressionBase
- All Superinterfaces:
- HasAggregationDepth,- HasFeaturesCol,- HasFitIntercept,- HasLabelCol,- HasMaxIter,- HasPredictionCol,- HasRegParam,- HasSolver,- HasTol,- HasWeightCol,- Identifiable,- org.apache.spark.internal.Logging,- Params,- PredictorParams,- Serializable
- All Known Implementing Classes:
- GeneralizedLinearRegression,- GeneralizedLinearRegressionModel
public interface GeneralizedLinearRegressionBase
extends PredictorParams, HasFitIntercept, HasMaxIter, HasTol, HasRegParam, HasWeightCol, HasSolver, HasAggregationDepth, org.apache.spark.internal.Logging
Params for Generalized Linear Regression.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.spark.internal.Loggingorg.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
- 
Method SummaryModifier and TypeMethodDescriptionfamily()Param for the name of family which is a description of the error distribution to be used in the model.getLink()doubledoublebooleanChecks whether we should output link prediction.booleanChecks whether offset column is set and nonempty.booleanChecks whether weight column is set and nonempty.link()Param for the name of link function which provides the relationship between the linear predictor and the mean of the distribution function.Param for the index in the power link function.Param for link prediction (linear predictor) column name.Param for offset column name.solver()The solver algorithm for optimization.validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType) Validates and transforms the input schema with the provided param map.Param for the power in the variance function of the Tweedie distribution which provides the relationship between the variance and mean of the distribution.Methods inherited from interface org.apache.spark.ml.param.shared.HasAggregationDepthaggregationDepth, getAggregationDepthMethods inherited from interface org.apache.spark.ml.param.shared.HasFeaturesColfeaturesCol, getFeaturesColMethods inherited from interface org.apache.spark.ml.param.shared.HasFitInterceptfitIntercept, getFitInterceptMethods inherited from interface org.apache.spark.ml.param.shared.HasLabelColgetLabelCol, labelColMethods inherited from interface org.apache.spark.ml.param.shared.HasMaxItergetMaxIter, maxIterMethods inherited from interface org.apache.spark.ml.param.shared.HasPredictionColgetPredictionCol, predictionColMethods inherited from interface org.apache.spark.ml.param.shared.HasRegParamgetRegParam, regParamMethods inherited from interface org.apache.spark.ml.param.shared.HasWeightColgetWeightCol, weightColMethods inherited from interface org.apache.spark.ml.util.IdentifiabletoString, uidMethods inherited from interface org.apache.spark.internal.LogginginitializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, 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, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContextMethods inherited from interface org.apache.spark.ml.param.Paramsclear, copy, copyValues, defaultCopy, defaultParamMap, estimateMatadataSize, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, onParamChange, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
- 
Method Details- 
familyParam for the name of family which is a description of the error distribution to be used in the model. Supported options: "gaussian", "binomial", "poisson", "gamma" and "tweedie". Default is "gaussian".- Returns:
- (undocumented)
 
- 
getFamilyString getFamily()
- 
getLinkString getLink()
- 
getLinkPowerdouble getLinkPower()
- 
getLinkPredictionColString getLinkPredictionCol()
- 
getOffsetColString getOffsetCol()
- 
getVariancePowerdouble getVariancePower()
- 
hasLinkPredictionColboolean hasLinkPredictionCol()Checks whether we should output link prediction.
- 
hasOffsetColboolean hasOffsetCol()Checks whether offset column is set and nonempty.
- 
hasWeightColboolean hasWeightCol()Checks whether weight column is set and nonempty.
- 
linkParam for the name of link function which provides the relationship between the linear predictor and the mean of the distribution function. Supported options: "identity", "log", "inverse", "logit", "probit", "cloglog" and "sqrt". This is used only when family is not "tweedie". The link function for the "tweedie" family must be specified throughlinkPower().- Returns:
- (undocumented)
 
- 
linkPowerDoubleParam linkPower()Param for the index in the power link function. Only applicable to the Tweedie family. Note that link power 0, 1, -1 or 0.5 corresponds to the Log, Identity, Inverse or Sqrt link, respectively. When not set, this value defaults to 1 -variancePower(), which matches the R "statmod" package.- Returns:
- (undocumented)
 
- 
linkPredictionColParam for link prediction (linear predictor) column name. Default is not set, which means we do not output link prediction.- Returns:
- (undocumented)
 
- 
offsetColParam for offset column name. If this is not set or empty, we treat all instance offsets as 0.0. The feature specified as offset has a constant coefficient of 1.0.- Returns:
- (undocumented)
 
- 
solverThe solver algorithm for optimization. Supported options: "irls" (iteratively reweighted least squares). Default: "irls"
- 
validateAndTransformSchemaStructType validateAndTransformSchema(StructType schema, boolean fitting, DataType featuresDataType) Description copied from interface:PredictorParamsValidates and transforms the input schema with the provided param map.- Specified by:
- validateAndTransformSchemain interface- PredictorParams
- Parameters:
- schema- input schema
- fitting- whether this is in fitting
- featuresDataType- SQL DataType for FeaturesType. E.g.,- VectorUDTfor vector features.
- Returns:
- output schema
 
- 
variancePowerDoubleParam variancePower()Param for the power in the variance function of the Tweedie distribution which provides the relationship between the variance and mean of the distribution. Only applicable to the Tweedie family. (see Tweedie Distribution (Wikipedia)) Supported values: 0 and [1, Inf). Note that variance power 0, 1, or 2 corresponds to the Gaussian, Poisson or Gamma family, respectively.- Returns:
- (undocumented)
 
 
-