public class AFTSurvivalRegressionModel extends RegressionModel<Vector,AFTSurvivalRegressionModel> implements AFTSurvivalRegressionParams, MLWritable
AFTSurvivalRegression
.Modifier and Type | Method and Description |
---|---|
IntParam |
aggregationDepth()
Param for suggested depth for treeAggregate (>= 2).
|
Param<String> |
censorCol()
Param for censor column name.
|
Vector |
coefficients() |
AFTSurvivalRegressionModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
BooleanParam |
fitIntercept()
Param for whether to fit an intercept term.
|
double |
intercept() |
static AFTSurvivalRegressionModel |
load(String path) |
DoubleParam |
maxBlockSizeInMB()
Param for Maximum memory in MB for stacking input data into blocks.
|
IntParam |
maxIter()
Param for maximum number of iterations (>= 0).
|
int |
numFeatures()
Returns the number of features the model was trained on.
|
double |
predict(Vector features)
Predict label for the given features.
|
Vector |
predictQuantiles(Vector features) |
DoubleArrayParam |
quantileProbabilities()
Param for quantile probabilities array.
|
Param<String> |
quantilesCol()
Param for quantiles column name.
|
static MLReader<AFTSurvivalRegressionModel> |
read() |
double |
scale() |
AFTSurvivalRegressionModel |
setQuantileProbabilities(double[] value) |
AFTSurvivalRegressionModel |
setQuantilesCol(String value) |
DoubleParam |
tol()
Param for the convergence tolerance for iterative algorithms (>= 0).
|
String |
toString() |
Dataset<Row> |
transform(Dataset<?> dataset)
Transforms dataset by reading from
featuresCol , calling predict , and storing
the predictions as a new column predictionCol . |
StructType |
transformSchema(StructType schema)
Check transform validity and derive the output schema from the input schema.
|
String |
uid()
An immutable unique ID for the object and its derivatives.
|
MLWriter |
write()
Returns an
MLWriter instance for this ML instance. |
featuresCol, labelCol, predictionCol, setFeaturesCol, setPredictionCol
transform, transform, transform
params
getCensorCol, getQuantileProbabilities, getQuantilesCol, hasQuantilesCol, validateAndTransformSchema
validateAndTransformSchema
getLabelCol, labelCol
featuresCol, getFeaturesCol
getPredictionCol, predictionCol
clear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwn
getMaxIter
getFitIntercept
getAggregationDepth
getMaxBlockSizeInMB
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
save
public static MLReader<AFTSurvivalRegressionModel> read()
public static AFTSurvivalRegressionModel load(String path)
public final Param<String> censorCol()
AFTSurvivalRegressionParams
censorCol
in interface AFTSurvivalRegressionParams
public final DoubleArrayParam quantileProbabilities()
AFTSurvivalRegressionParams
quantileProbabilities
in interface AFTSurvivalRegressionParams
public final Param<String> quantilesCol()
AFTSurvivalRegressionParams
quantilesCol
in interface AFTSurvivalRegressionParams
public final DoubleParam maxBlockSizeInMB()
HasMaxBlockSizeInMB
maxBlockSizeInMB
in interface HasMaxBlockSizeInMB
public final IntParam aggregationDepth()
HasAggregationDepth
aggregationDepth
in interface HasAggregationDepth
public final BooleanParam fitIntercept()
HasFitIntercept
fitIntercept
in interface HasFitIntercept
public final DoubleParam tol()
HasTol
public final IntParam maxIter()
HasMaxIter
maxIter
in interface HasMaxIter
public String uid()
Identifiable
uid
in interface Identifiable
public Vector coefficients()
public double intercept()
public double scale()
public int numFeatures()
PredictionModel
numFeatures
in class PredictionModel<Vector,AFTSurvivalRegressionModel>
public AFTSurvivalRegressionModel setQuantileProbabilities(double[] value)
public AFTSurvivalRegressionModel setQuantilesCol(String value)
public double predict(Vector features)
PredictionModel
transform()
and output predictionCol
.predict
in class PredictionModel<Vector,AFTSurvivalRegressionModel>
features
- (undocumented)public Dataset<Row> transform(Dataset<?> dataset)
PredictionModel
featuresCol
, calling predict
, and storing
the predictions as a new column predictionCol
.
transform
in class PredictionModel<Vector,AFTSurvivalRegressionModel>
dataset
- input datasetpredictionCol
of type Double
public StructType transformSchema(StructType schema)
PipelineStage
We check validity for interactions between parameters during transformSchema
and
raise an exception if any parameter value is invalid. Parameter value checks which
do not depend on other parameters are handled by Param.validate()
.
Typical implementation should first conduct verification on schema change and parameter validity, including complex parameter interaction checks.
transformSchema
in class PredictionModel<Vector,AFTSurvivalRegressionModel>
schema
- (undocumented)public AFTSurvivalRegressionModel copy(ParamMap extra)
Params
defaultCopy()
.copy
in interface Params
copy
in class Model<AFTSurvivalRegressionModel>
extra
- (undocumented)public MLWriter write()
MLWritable
MLWriter
instance for this ML instance.write
in interface MLWritable
public String toString()
toString
in interface Identifiable
toString
in class Object