Class

com.linkedin.photon.ml.hyperparameter.search

GaussianProcessSearch

Related Doc: package search

Permalink

class GaussianProcessSearch[T] extends RandomSearch[T]

Performs a guided random search of the given ranges, where the search is guided by a Gaussian Process estimated from evaluations of the actual evaluation function. Since we assume that the evaluation function is very costly (as it often is for doing a full train / cycle evaluation of a machine learning model), it makes sense to spend time doing what would otherwise be considered an expensive computation to reduce the number of times we need to evaluate the function.

At a high level, the search routine proceeds as follows:

1) Assume a uniform prior over the evaluation function 2) Receive a new observation, and use it along with any previous observations to train a new Gaussian Process regression model for the evaluation function. This approximation is the new posterior over the evaluation function. 3) Sample candidates uniformly, evaluate the posterior for each, and select the candidate with the highest predicted evaluation. 4) Evaluate the best candidate with the actual evaluation function to acquire a new observation. 5) Repeat from step 2.

Linear Supertypes
RandomSearch[T], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GaussianProcessSearch
  2. RandomSearch
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GaussianProcessSearch(numParams: Int, evaluationFunction: EvaluationFunction[T], discreteParams: Map[Int, Int] = Map(), kernel: StationaryKernel = new Matern52, candidatePoolSize: Int = 250, noisyTarget: Boolean = true, seed: Long = System.currentTimeMillis)

    Permalink

    numParams

    the dimensionality of the hyper-parameter tuning problem

    evaluationFunction

    the function that evaluates points in the space to real values

    discreteParams

    specifies the indices of discrete parameters and their numbers of discrete values

    kernel

    specifies the covariance kernel for hyper-parameters

    candidatePoolSize

    the number of candidate points to draw at each iteration. Larger numbers give more precise results, but also incur higher computational cost.

    noisyTarget

    whether to include observation noise in the evaluation function model

    seed

    the random seed value

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def discretizeCandidate(candidate: DenseVector[Double], discreteParams: Map[Int, Int]): DenseVector[Double]

    Permalink

    Discretize candidates with specified indices.

    Discretize candidates with specified indices.

    candidate

    candidate with values in [0, 1]

    discreteParams

    Map that specifies the indices of discrete parameters and their numbers of discrete values

    returns

    candidate with the specified discrete values

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.search]
    Definition Classes
    RandomSearch
  7. def drawCandidates(n: Int): DenseMatrix[Double]

    Permalink

    Draw candidates from the distributions along each dimension in the space

    Draw candidates from the distributions along each dimension in the space

    n

    the number of candidates to draw

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.search]
    Definition Classes
    RandomSearch
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def find(n: Int): Seq[T]

    Permalink

    Searches and returns n points in the space.

    Searches and returns n points in the space.

    n

    The number of points to find

    returns

    The found points

    Definition Classes
    RandomSearch
  12. def findWithPriorObservations(n: Int, priorObservations: Seq[(DenseVector[Double], Double)]): Seq[T]

    Permalink

    Searches and returns n points in the space, given prior observations from past data sets.

    Searches and returns n points in the space, given prior observations from past data sets.

    n

    The number of points to find

    priorObservations

    Observations made prior to searching, from past data sets (mean-centered)

    returns

    The found points

    Definition Classes
    RandomSearch
  13. def findWithPriors(n: Int, observations: Seq[(DenseVector[Double], Double)], priorObservations: Seq[(DenseVector[Double], Double)]): Seq[T]

    Permalink

    Searches and returns n points in the space, given prior observations from this data set and past data sets.

    Searches and returns n points in the space, given prior observations from this data set and past data sets.

    n

    The number of points to find

    observations

    Observations made prior to searching, from this data set (not mean-centered)

    priorObservations

    Observations made prior to searching, from past data sets (mean-centered)

    returns

    The found points

    Definition Classes
    RandomSearch
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getLastModel: GaussianProcessModel

    Permalink

    Returns the last model trained during search

    Returns the last model trained during search

    returns

    the last model

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. def next(lastCandidate: DenseVector[Double], lastObservation: Double): DenseVector[Double]

    Permalink

    Produces the next candidate, given the last.

    Produces the next candidate, given the last. In this case, we fit a Gaussian Process to the previous observations, and use it to predict the value of uniformly-drawn candidate points. The candidate with the best predicted evaluation is chosen.

    lastCandidate

    the last candidate

    lastObservation

    the last observed value

    returns

    the next candidate

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.search]
    Definition Classes
    GaussianProcessSearchRandomSearch
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def onObservation(point: DenseVector[Double], eval: Double): Unit

    Permalink

    Handler callback for each observation.

    Handler callback for each observation. In this case, we record the observed point and values.

    point

    the observed point in the space

    eval

    the observed value

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.search]
    Definition Classes
    GaussianProcessSearchRandomSearch
  23. def onPriorObservation(point: DenseVector[Double], eval: Double): Unit

    Permalink

    Handler callback for each observation in the prior data.

    Handler callback for each observation in the prior data. In this case, we record the observed point and values.

    point

    the observed point in the space

    eval

    the observed value

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.search]
    Definition Classes
    GaussianProcessSearchRandomSearch
  24. def selectBestCandidate(candidates: DenseMatrix[Double], predictions: DenseVector[Double], transformation: PredictionTransformation): DenseVector[Double]

    Permalink

    Selects the best candidate according to the predicted values, where "best" is determined by the given transformation.

    Selects the best candidate according to the predicted values, where "best" is determined by the given transformation. In the case of EI, we always search for the max; In the case of CB, we always search for the min.

    candidates

    matrix of candidates

    predictions

    predicted values for each candidate

    transformation

    prediction transformation function

    returns

    the candidate with the best value

    Attributes
    protected[com.linkedin.photon.ml.hyperparameter.search]
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RandomSearch[T]

Inherited from AnyRef

Inherited from Any

Ungrouped