-
- Downloads
[SPARK-19155][ML] Make family case insensitive in GLM
## What changes were proposed in this pull request? This is a supplement to PR #16516 which did not make the value from `getFamily` case insensitive. Current tests of poisson/binomial glm with weight fail when specifying 'Poisson' or 'Binomial', because the calculation of `dispersion` and `pValue` checks the value of family retrieved from `getFamily` ``` model.getFamily == Binomial.name || model.getFamily == Poisson.name ``` ## How was this patch tested? Update existing tests for 'Poisson' and 'Binomial'. yanboliang felixcheung imatiach-msft Author: actuaryzhang <actuaryzhang10@gmail.com> Closes #16675 from actuaryzhang/family. (cherry picked from commit f067acef) Signed-off-by:Yanbo Liang <ybliang8@gmail.com>
Showing
- mllib/src/main/scala/org/apache/spark/ml/regression/GeneralizedLinearRegression.scala 4 additions, 2 deletions...che/spark/ml/regression/GeneralizedLinearRegression.scala
- mllib/src/test/scala/org/apache/spark/ml/regression/GeneralizedLinearRegressionSuite.scala 2 additions, 2 deletions...park/ml/regression/GeneralizedLinearRegressionSuite.scala
Please register or sign in to comment