Class ParamGridBuilder

Object
org.apache.spark.ml.tuning.ParamGridBuilder

public class ParamGridBuilder extends Object
Builder for a param grid used in grid search-based model selection.
  • Constructor Details

    • ParamGridBuilder

      public ParamGridBuilder()
  • Method Details

    • addGrid

      public <T> ParamGridBuilder addGrid(Param<T> param, scala.collection.Iterable<T> values)
      Adds a param with multiple values (overwrites if the input param exists).
      Parameters:
      param - (undocumented)
      values - (undocumented)
      Returns:
      (undocumented)
    • addGrid

      public ParamGridBuilder addGrid(DoubleParam param, double[] values)
      Adds a double param with multiple values.
      Parameters:
      param - (undocumented)
      values - (undocumented)
      Returns:
      (undocumented)
    • addGrid

      public ParamGridBuilder addGrid(IntParam param, int[] values)
      Adds an int param with multiple values.
      Parameters:
      param - (undocumented)
      values - (undocumented)
      Returns:
      (undocumented)
    • addGrid

      public ParamGridBuilder addGrid(FloatParam param, float[] values)
      Adds a float param with multiple values.
      Parameters:
      param - (undocumented)
      values - (undocumented)
      Returns:
      (undocumented)
    • addGrid

      public ParamGridBuilder addGrid(LongParam param, long[] values)
      Adds a long param with multiple values.
      Parameters:
      param - (undocumented)
      values - (undocumented)
      Returns:
      (undocumented)
    • addGrid

      public ParamGridBuilder addGrid(BooleanParam param)
      Adds a boolean param with true and false.
      Parameters:
      param - (undocumented)
      Returns:
      (undocumented)
    • baseOn

      public ParamGridBuilder baseOn(ParamPair<?>... paramPairs)
      Sets the given parameters in this grid to fixed values.
      Parameters:
      paramPairs - (undocumented)
      Returns:
      (undocumented)
    • baseOn

      public ParamGridBuilder baseOn(ParamMap paramMap)
      Sets the given parameters in this grid to fixed values.
      Parameters:
      paramMap - (undocumented)
      Returns:
      (undocumented)
    • baseOn

      public ParamGridBuilder baseOn(scala.collection.immutable.Seq<ParamPair<?>> paramPairs)
      Sets the given parameters in this grid to fixed values.
      Parameters:
      paramPairs - (undocumented)
      Returns:
      (undocumented)
    • build

      public ParamMap[] build()
      Builds and returns all combinations of parameters specified by the param grid.
      Returns:
      (undocumented)