public class AFTSurvivalRegression extends Estimator<AFTSurvivalRegressionModel> implements Logging
https://en.wikipedia.org/wiki/Accelerated_failure_time_model)
based on the Weibull distribution of the survival time.| Constructor and Description |
|---|
AFTSurvivalRegression() |
AFTSurvivalRegression(java.lang.String uid) |
| Modifier and Type | Method and Description |
|---|---|
Param<java.lang.String> |
censorCol()
Param for censor column name.
|
AFTSurvivalRegression |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
protected RDD<org.apache.spark.ml.regression.AFTPoint> |
extractAFTPoints(DataFrame dataset)
Extract
featuresCol, labelCol and censorCol from input dataset,
and put it in an RDD with strong types. |
AFTSurvivalRegressionModel |
fit(DataFrame dataset)
Fits a model to the input data.
|
java.lang.String |
getCensorCol() |
double[] |
getQuantileProbabilities() |
java.lang.String |
getQuantilesCol() |
boolean |
hasQuantilesCol()
Checks whether the input has quantiles column name.
|
static AFTSurvivalRegression |
load(java.lang.String path) |
DoubleArrayParam |
quantileProbabilities()
Param for quantile probabilities array.
|
Param<java.lang.String> |
quantilesCol()
Param for quantiles column name.
|
AFTSurvivalRegression |
setCensorCol(java.lang.String value) |
AFTSurvivalRegression |
setFeaturesCol(java.lang.String value) |
AFTSurvivalRegression |
setFitIntercept(boolean value)
Set if we should fit the intercept
Default is true.
|
AFTSurvivalRegression |
setLabelCol(java.lang.String value) |
AFTSurvivalRegression |
setMaxIter(int value)
Set the maximum number of iterations.
|
AFTSurvivalRegression |
setPredictionCol(java.lang.String value) |
AFTSurvivalRegression |
setQuantileProbabilities(double[] value) |
AFTSurvivalRegression |
setQuantilesCol(java.lang.String value) |
AFTSurvivalRegression |
setTol(double value)
Set the convergence tolerance of iterations.
|
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
java.lang.String |
uid()
An immutable unique ID for the object and its derivatives.
|
StructType |
validateAndTransformSchema(StructType schema,
boolean fitting)
Validates and transforms the input schema with the provided param map.
|
transformSchemaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn, validateParamstoStringinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic AFTSurvivalRegression(java.lang.String uid)
public AFTSurvivalRegression()
public static AFTSurvivalRegression load(java.lang.String path)
public java.lang.String uid()
Identifiableuid in interface Identifiablepublic AFTSurvivalRegression setFeaturesCol(java.lang.String value)
public AFTSurvivalRegression setLabelCol(java.lang.String value)
public AFTSurvivalRegression setCensorCol(java.lang.String value)
public AFTSurvivalRegression setPredictionCol(java.lang.String value)
public AFTSurvivalRegression setQuantileProbabilities(double[] value)
public AFTSurvivalRegression setQuantilesCol(java.lang.String value)
public AFTSurvivalRegression setFitIntercept(boolean value)
value - (undocumented)public AFTSurvivalRegression setMaxIter(int value)
value - (undocumented)public AFTSurvivalRegression setTol(double value)
value - (undocumented)protected RDD<org.apache.spark.ml.regression.AFTPoint> extractAFTPoints(DataFrame dataset)
featuresCol, labelCol and censorCol from input dataset,
and put it in an RDD with strong types.dataset - (undocumented)public AFTSurvivalRegressionModel fit(DataFrame dataset)
Estimatorfit in class Estimator<AFTSurvivalRegressionModel>dataset - (undocumented)public StructType transformSchema(StructType schema)
PipelineStageDerives the output schema from the input schema.
transformSchema in class PipelineStageschema - (undocumented)public AFTSurvivalRegression copy(ParamMap extra)
Paramscopy in interface Paramscopy in class Estimator<AFTSurvivalRegressionModel>extra - (undocumented)defaultCopy()public Param<java.lang.String> censorCol()
public java.lang.String getCensorCol()
public DoubleArrayParam quantileProbabilities()
public double[] getQuantileProbabilities()
public Param<java.lang.String> quantilesCol()
public java.lang.String getQuantilesCol()
public boolean hasQuantilesCol()
public StructType validateAndTransformSchema(StructType schema, boolean fitting)
schema - input schemafitting - whether this is in fitting or prediction