@@ -57,7 +57,7 @@ private[regression] trait GeneralizedLinearRegressionBase extends PredictorParam
5757 final val family : Param [String ] = new Param (this , " family" ,
5858 " The name of family which is a description of the error distribution to be used in the " +
5959 s " model. Supported options: ${supportedFamilyNames.mkString(" , " )}. " ,
60- ParamValidators .inArray[ String ]( supportedFamilyNames.toArray ))
60+ ( value : String ) => supportedFamilyNames.contains(value.toLowerCase ))
6161
6262 /** @group getParam */
6363 @ Since (" 2.0.0" )
@@ -74,7 +74,7 @@ private[regression] trait GeneralizedLinearRegressionBase extends PredictorParam
7474 final val link : Param [String ] = new Param (this , " link" , " The name of link function " +
7575 " which provides the relationship between the linear predictor and the mean of the " +
7676 s " distribution function. Supported options: ${supportedLinkNames.mkString(" , " )}" ,
77- ParamValidators .inArray[ String ]( supportedLinkNames.toArray ))
77+ ( value : String ) => supportedLinkNames.contains(value.toLowerCase ))
7878
7979 /** @group getParam */
8080 @ Since (" 2.0.0" )
@@ -414,7 +414,7 @@ object GeneralizedLinearRegression extends DefaultParamsReadable[GeneralizedLine
414414 * @param name family name: "gaussian", "binomial", "poisson" or "gamma".
415415 */
416416 def fromName (name : String ): Family = {
417- name match {
417+ name.toLowerCase match {
418418 case Gaussian .name => Gaussian
419419 case Binomial .name => Binomial
420420 case Poisson .name => Poisson
@@ -626,7 +626,7 @@ object GeneralizedLinearRegression extends DefaultParamsReadable[GeneralizedLine
626626 * "inverse", "probit", "cloglog" or "sqrt".
627627 */
628628 def fromName (name : String ): Link = {
629- name match {
629+ name.toLowerCase match {
630630 case Identity .name => Identity
631631 case Logit .name => Logit
632632 case Log .name => Log
0 commit comments