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() |
setProbabilityCol
setRawPredictionCol, transformColumnsImpl
setFeaturesCol, setPredictionCol, transformSchema
transform, transform
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validateAndTransformSchema
getLabelCol, labelCol
featuresCol, getFeaturesCol
getPredictionCol, predictionCol
addOutputColumn, checkInputColumn, explainParams, get, getParam, isSet, paramMap, params, set, set, validate, validate
uid
getRawPredictionCol, rawPredictionCol
getProbabilityCol, probabilityCol
getRegParam, regParam
getMaxIter, maxIter
getThreshold, threshold
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public LogisticRegressionModel(LogisticRegression parent, ParamMap fittingParamMap, Vector weights, double intercept)
public LogisticRegression parent()
Model
parent
in class Model<LogisticRegressionModel>
public ParamMap fittingParamMap()
Model
fittingParamMap
in class Model<LogisticRegressionModel>
public Vector weights()
public double intercept()
public LogisticRegressionModel setThreshold(double value)
public DataFrame transform(DataFrame dataset, ParamMap paramMap)
ProbabilisticClassificationModel
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
.
transform
in class ProbabilisticClassificationModel<Vector,LogisticRegressionModel>
dataset
- input datasetparamMap
- additional parameters, overwrite embedded paramspublic int numClasses()
ClassificationModel
numClasses
in class ClassificationModel<Vector,LogisticRegressionModel>