public class LogisticRegressionModel extends ProbabilisticClassificationModel<Vector,LogisticRegressionModel> implements LogisticRegressionParams
Model produced by LogisticRegression.
| Constructor and Description |
|---|
LogisticRegressionModel(LogisticRegression parent,
ParamMap fittingParamMap,
Vector weights,
double intercept) |
| Modifier and Type | Method and Description |
|---|---|
ParamMap |
fittingParamMap()
Fitting parameters, such that parent.fit(..., fittingParamMap) could reproduce the model.
|
double |
intercept() |
int |
numClasses()
Number of classes (values which the label can take).
|
LogisticRegression |
parent()
The parent estimator that produced this model.
|
LogisticRegressionModel |
setThreshold(double value) |
DataFrame |
transform(DataFrame dataset,
ParamMap paramMap)
Transforms dataset by reading from
featuresCol, and appending new columns as specified by
parameters:
- predicted labels as predictionCol of type Double
- raw predictions (confidences) as rawPredictionCol of type Vector
- probability of each class as probabilityCol of type Vector. |
Vector |
weights() |
setProbabilityColsetRawPredictionCol, transformColumnsImplsetFeaturesCol, setPredictionCol, transformSchematransform, transformequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvalidateAndTransformSchemagetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColaddOutputColumn, checkInputColumn, explainParams, get, getParam, isSet, paramMap, params, set, set, validate, validateuidgetRawPredictionCol, rawPredictionColgetProbabilityCol, probabilityColgetRegParam, regParamgetMaxIter, maxItergetThreshold, thresholdinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic LogisticRegressionModel(LogisticRegression parent, ParamMap fittingParamMap, Vector weights, double intercept)
public LogisticRegression parent()
Modelparent in class Model<LogisticRegressionModel>public ParamMap fittingParamMap()
ModelfittingParamMap in class Model<LogisticRegressionModel>public Vector weights()
public double intercept()
public LogisticRegressionModel setThreshold(double value)
public DataFrame transform(DataFrame dataset, ParamMap paramMap)
ProbabilisticClassificationModelfeaturesCol, and appending new columns as specified by
parameters:
- predicted labels as predictionCol of type Double
- raw predictions (confidences) as rawPredictionCol of type Vector
- probability of each class as probabilityCol of type Vector.
transform in class ProbabilisticClassificationModel<Vector,LogisticRegressionModel>dataset - input datasetparamMap - additional parameters, overwrite embedded paramspublic int numClasses()
ClassificationModelnumClasses in class ClassificationModel<Vector,LogisticRegressionModel>