class TuneHyperparameters extends Estimator[TuneHyperparametersModel] with Wrappable with ComplexParamsWritable with HasEvaluationMetric with BasicLogging

Tunes model hyperparameters

Allows user to specify multiple untrained models to tune using various search strategies. Currently supports cross validation with random grid search.

Linear Supertypes
BasicLogging, HasEvaluationMetric, ComplexParamsWritable, MLWritable, Wrappable, RWrappable, PythonWrappable, BaseWrappable, Estimator[TuneHyperparametersModel], PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TuneHyperparameters
  2. BasicLogging
  3. HasEvaluationMetric
  4. ComplexParamsWritable
  5. MLWritable
  6. Wrappable
  7. RWrappable
  8. PythonWrappable
  9. BaseWrappable
  10. Estimator
  11. PipelineStage
  12. Logging
  13. Params
  14. Serializable
  15. Serializable
  16. Identifiable
  17. AnyRef
  18. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TuneHyperparameters()
  2. new TuneHyperparameters(uid: String)

Value Members

  1. final def clear(param: Param[_]): TuneHyperparameters.this.type
    Definition Classes
    Params
  2. def copy(extra: ParamMap): Estimator[TuneHyperparametersModel]
    Definition Classes
    TuneHyperparameters → Estimator → PipelineStage → Params
  3. val evaluationMetric: Param[String]
    Definition Classes
    HasEvaluationMetric
  4. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  5. def explainParams(): String
    Definition Classes
    Params
  6. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  7. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  8. def fit(dataset: Dataset[_]): TuneHyperparametersModel

    Tunes model hyperparameters for given number of runs and returns the best model found based on evaluation metric.

    Tunes model hyperparameters for given number of runs and returns the best model found based on evaluation metric.

    dataset

    The input dataset to train.

    returns

    The trained classification model.

    Definition Classes
    TuneHyperparameters → Estimator
  9. def fit(dataset: Dataset[_], paramMaps: Seq[ParamMap]): Seq[TuneHyperparametersModel]
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" )
  10. def fit(dataset: Dataset[_], paramMap: ParamMap): TuneHyperparametersModel
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" )
  11. def fit(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): TuneHyperparametersModel
    Definition Classes
    Estimator
    Annotations
    @Since( "2.0.0" ) @varargs()
  12. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  13. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  14. def getEvaluationMetric: String

    Definition Classes
    HasEvaluationMetric
  15. def getModels: Array[Estimator[_]]

  16. def getNumFolds: Int

  17. def getNumRuns: Int

  18. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  19. def getParallelism: Int

  20. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  21. def getParamSpace: ParamSpace

  22. def getSeed: Long

  23. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  24. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  25. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  26. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  27. def logClass(): Unit
    Definition Classes
    BasicLogging
  28. def logFit[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  29. def logPredict[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  30. def logTrain[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  31. def logTransform[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  32. def logVerb[T](verb: String, f: ⇒ T): T
    Definition Classes
    BasicLogging
  33. def makePyFile(conf: CodegenConfig): Unit
    Definition Classes
    PythonWrappable
  34. def makeRFile(conf: CodegenConfig): Unit
    Definition Classes
    RWrappable
  35. val models: EstimatorArrayParam

    Estimators to run

  36. val numFolds: IntParam
  37. val numRuns: IntParam
  38. val parallelism: IntParam
  39. val paramSpace: ParamSpaceParam
  40. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  41. def pyAdditionalMethods: String
    Definition Classes
    PythonWrappable
  42. def pyInitFunc(): String
    Definition Classes
    PythonWrappable
  43. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  44. val seed: LongParam
  45. final def set[T](param: Param[T], value: T): TuneHyperparameters.this.type
    Definition Classes
    Params
  46. def setEvaluationMetric(value: String): TuneHyperparameters.this.type

    Definition Classes
    HasEvaluationMetric
  47. def setModels(value: Array[Estimator[_]]): TuneHyperparameters.this.type

  48. def setNumFolds(value: Int): TuneHyperparameters.this.type

  49. def setNumRuns(value: Int): TuneHyperparameters.this.type

  50. def setParallelism(value: Int): TuneHyperparameters.this.type

  51. def setParamSpace(value: ParamSpace): TuneHyperparameters.this.type

  52. def setSeed(value: Long): TuneHyperparameters.this.type

  53. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  54. def transformSchema(schema: StructType): StructType
    Definition Classes
    TuneHyperparameters → PipelineStage
    Annotations
    @DeveloperApi()
  55. val uid: String
    Definition Classes
    TuneHyperparametersBasicLogging → Identifiable
  56. val ver: String
    Definition Classes
    BasicLogging
  57. def write: MLWriter
    Definition Classes
    ComplexParamsWritable → MLWritable