com.microsoft.ml.spark.core.serialize.params.EstimatorParam.scala Maven / Gradle / Ivy
The newest version!
// Copyright (C) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in project root for information.
package org.apache.spark.ml.param
import com.microsoft.ml.spark.core.serialize.ComplexParam
import org.apache.spark.ml.{Estimator, Model}
/** Param for Estimator. Needed as spark has explicit com.microsoft.ml.spark.core.serialize.params for many different
* types but not Estimator.
*/
class EstimatorParam(parent: Params, name: String, doc: String, isValid: Estimator[_ <: Model[_]] => Boolean)
extends ComplexParam[Estimator[_ <: Model[_]]](parent, name, doc, isValid) {
def this(parent: Params, name: String, doc: String) =
this(parent, name, doc, ParamValidators.alwaysTrue)
}