Skip to content
Snippets Groups Projects
Commit cfca0113 authored by Peng's avatar Peng Committed by Yanbo Liang
Browse files

[SPARK-20764][ML][PYSPARK] Fix visibility discrepancy with numInstances and...

[SPARK-20764][ML][PYSPARK] Fix visibility discrepancy with numInstances and degreesOfFreedom in LR and GLR - Python version

## What changes were proposed in this pull request?

SPARK-20097 exposed degreesOfFreedom in LinearRegressionSummary and numInstances in GeneralizedLinearRegressionSummary. Python API should be updated to reflect these changes.

## How was this patch tested?
The existing UT

Author: Peng <peng.meng@intel.com>

Closes #18062 from mpjlu/spark-20764.
parent f3ed62a3
No related branches found
No related tags found
No related merge requests found
......@@ -323,6 +323,14 @@ class LinearRegressionSummary(JavaWrapper):
"""
return self._call_java("numInstances")
@property
@since("2.2.0")
def degreesOfFreedom(self):
"""
Degrees of freedom.
"""
return self._call_java("degreesOfFreedom")
@property
@since("2.0.0")
def devianceResiduals(self):
......@@ -1565,6 +1573,14 @@ class GeneralizedLinearRegressionSummary(JavaWrapper):
"""
return self._call_java("predictionCol")
@property
@since("2.2.0")
def numInstances(self):
"""
Number of instances in DataFrame predictions.
"""
return self._call_java("numInstances")
@property
@since("2.0.0")
def rank(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment