@@ -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" )
@@ -405,7 +405,7 @@ object GeneralizedLinearRegression extends DefaultParamsReadable[GeneralizedLine
405405 * @param name family name: "gaussian", "binomial", "poisson" or "gamma".
406406 */
407407 def fromName (name : String ): Family = {
408- name match {
408+ name.toLowerCase match {
409409 case Gaussian .name => Gaussian
410410 case Binomial .name => Binomial
411411 case Poisson .name => Poisson
@@ -609,7 +609,7 @@ object GeneralizedLinearRegression extends DefaultParamsReadable[GeneralizedLine
609609 * "inverse", "probit", "cloglog" or "sqrt".
610610 */
611611 def fromName (name : String ): Link = {
612- name match {
612+ name.toLowerCase match {
613613 case Identity .name => Identity
614614 case Logit .name => Logit
615615 case Log .name => Log
0 commit comments