public class GeneralizedLinearRegressionModel extends RegressionModel<Vector,GeneralizedLinearRegressionModel> implements GeneralizedLinearRegressionBase, MLWritable
GeneralizedLinearRegression.| Modifier and Type | Method and Description |
|---|---|
Vector |
coefficients() |
GeneralizedLinearRegressionModel |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
GeneralizedLinearRegressionSummary |
evaluate(Dataset<?> dataset)
Evaluate the model on the given dataset, returning a summary of the results.
|
boolean |
hasSummary()
Indicates if
summary is available. |
double |
intercept() |
static GeneralizedLinearRegressionModel |
load(String path) |
int |
numFeatures()
Returns the number of features the model was trained on.
|
double |
predict(Vector features)
Predict label for the given features.
|
static MLReader<GeneralizedLinearRegressionModel> |
read() |
GeneralizedLinearRegressionModel |
setLinkPredictionCol(String value)
Sets the link prediction (linear predictor) column name.
|
GeneralizedLinearRegressionTrainingSummary |
summary()
Gets R-like summary of model on training set.
|
Dataset<Row> |
transform(Dataset<?> dataset)
Transforms dataset by reading from
featuresCol, calling predict, and storing
the predictions as a new column predictionCol. |
String |
uid()
An immutable unique ID for the object and its derivatives.
|
MLWriter |
write()
Returns a
MLWriter instance for this ML instance. |
setFeaturesCol, setPredictionCol, transformSchematransform, transform, transformequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfamily, getFamily, getLink, getLinkPower, getLinkPredictionCol, getOffsetCol, getVariancePower, hasLinkPredictionCol, hasOffsetCol, hasWeightCol, link, linkPower, linkPredictionCol, offsetCol, solver, validateAndTransformSchema, variancePowergetLabelCol, labelColfeaturesCol, getFeaturesColgetPredictionCol, predictionColclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringfitIntercept, getFitInterceptgetMaxIter, maxItergetRegParam, regParamgetWeightCol, weightColinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningsavepublic static MLReader<GeneralizedLinearRegressionModel> read()
public static GeneralizedLinearRegressionModel load(String path)
public String uid()
Identifiableuid in interface Identifiablepublic Vector coefficients()
public double intercept()
public GeneralizedLinearRegressionModel setLinkPredictionCol(String value)
value - (undocumented)public double predict(Vector features)
PredictionModeltransform() and output predictionCol.predict in class PredictionModel<Vector,GeneralizedLinearRegressionModel>features - (undocumented)public Dataset<Row> transform(Dataset<?> dataset)
PredictionModelfeaturesCol, calling predict, and storing
the predictions as a new column predictionCol.
transform in class PredictionModel<Vector,GeneralizedLinearRegressionModel>dataset - input datasetpredictionCol of type Doublepublic GeneralizedLinearRegressionTrainingSummary summary()
public boolean hasSummary()
summary is available.public GeneralizedLinearRegressionSummary evaluate(Dataset<?> dataset)
dataset - (undocumented)public GeneralizedLinearRegressionModel copy(ParamMap extra)
ParamsdefaultCopy().copy in interface Paramscopy in class Model<GeneralizedLinearRegressionModel>extra - (undocumented)public MLWriter write()
MLWriter instance for this ML instance.
For GeneralizedLinearRegressionModel, this does NOT currently save the
training summary. An option to save summary may be added in the future.
write in interface MLWritablepublic int numFeatures()
PredictionModelnumFeatures in class PredictionModel<Vector,GeneralizedLinearRegressionModel>