GeneralizedLinearRegressionTrainingSummary

class pyspark.ml.regression.GeneralizedLinearRegressionTrainingSummary(java_obj: Optional[JavaObject] = None)

Generalized linear regression training results.

Methods

residuals([residualsType])

Get the residuals of the fitted model by type.

Attributes

aic

Akaike’s “An Information Criterion”(AIC) for the fitted model.

coefficientStandardErrors

Standard error of estimated coefficients and intercept.

degreesOfFreedom

Degrees of freedom.

deviance

The deviance for the fitted model.

dispersion

The dispersion of the fitted model.

nullDeviance

The deviance for the null model.

numInstances

Number of instances in DataFrame predictions.

numIterations

Number of training iterations.

pValues

Two-sided p-value of estimated coefficients and intercept.

predictionCol

Field in predictions which gives the predicted value of each instance.

predictions

Predictions output by the model’s transform method.

rank

The numeric rank of the fitted linear model.

residualDegreeOfFreedom

The residual degrees of freedom.

residualDegreeOfFreedomNull

The residual degrees of freedom for the null model.

solver

The numeric solver used for training.

tValues

T-statistic of estimated coefficients and intercept.

Methods Documentation

residuals(residualsType: str = 'deviance') → pyspark.sql.dataframe.DataFrame

Get the residuals of the fitted model by type.

Parameters
residualsTypestr, optional

The type of residuals which should be returned. Supported options: deviance (default), pearson, working, and response.

Attributes Documentation

aic

Akaike’s “An Information Criterion”(AIC) for the fitted model.

coefficientStandardErrors

Standard error of estimated coefficients and intercept.

If GeneralizedLinearRegression.fitIntercept is set to True, then the last element returned corresponds to the intercept.

degreesOfFreedom

Degrees of freedom.

deviance

The deviance for the fitted model.

dispersion

The dispersion of the fitted model. It is taken as 1.0 for the “binomial” and “poisson” families, and otherwise estimated by the residual Pearson’s Chi-Squared statistic (which is defined as sum of the squares of the Pearson residuals) divided by the residual degrees of freedom.

nullDeviance

The deviance for the null model.

numInstances

Number of instances in DataFrame predictions.

numIterations

Number of training iterations.

pValues

Two-sided p-value of estimated coefficients and intercept.

If GeneralizedLinearRegression.fitIntercept is set to True, then the last element returned corresponds to the intercept.

predictionCol

Field in predictions which gives the predicted value of each instance. This is set to a new column name if the original model’s predictionCol is not set.

predictions

Predictions output by the model’s transform method.

rank

The numeric rank of the fitted linear model.

residualDegreeOfFreedom

The residual degrees of freedom.

residualDegreeOfFreedomNull

The residual degrees of freedom for the null model.

solver

The numeric solver used for training.

tValues

T-statistic of estimated coefficients and intercept.

If GeneralizedLinearRegression.fitIntercept is set to True, then the last element returned corresponds to the intercept.