com.eharmony.aloha.models.exploration

EpsilonGreedyModel

case class EpsilonGreedyModel[U, N, -A, B <: U](modelId: ModelIdentity, defaultPolicy: Submodel[Int, A, U], epsilon: Float, salt: GenAggFunc[A, Long], classLabels: IndexedSeq[N], auditor: Auditor[U, N, B]) extends SubmodelBase[U, N, A, B] with Product with Serializable

A model which does epsilon greedy style exploration. This will choose a random action with probability epsilon or an action from the defaultPolicy with probability 1 - epsilon. Note that the default policy MUST return a value between 1 and the number of actions, and if not an exception will be thrown.

A

model input type

B

model output type

modelId

a model identifier

defaultPolicy

the model to use for exploitation. This MUST be deterministic for the probability to be correct. The model must return a value in the range 1 to classLabels.size (inclusive).

epsilon

the exploration/exploitation tradeoff parameter. epsilon must be in the interval [0, 1]. 0 indicates never select an action randomly. 1 indicates always select an action randomly.

salt

a function that generates a salt for the randomization layer. This salt allows the random choice of which policy to follow to be repeatable.

classLabels

a list of class labels to output for the final type. Also note that the size of this controls the number of actions. If the submodel returns a score < 1 or > classLabels.size (note the 1 offset) then a RuntimeException will be thrown.

Linear Supertypes
Serializable, Serializable, Product, Equals, SubmodelBase[U, N, A, B], Model[A, B], (A) ⇒ B, Submodel[N, A, B], Closeable, AutoCloseable, Identifiable[ModelIdentity], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EpsilonGreedyModel
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. SubmodelBase
  7. Model
  8. Function1
  9. Submodel
  10. Closeable
  11. AutoCloseable
  12. Identifiable
  13. AnyRef
  14. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EpsilonGreedyModel(modelId: ModelIdentity, defaultPolicy: Submodel[Int, A, U], epsilon: Float, salt: GenAggFunc[A, Long], classLabels: IndexedSeq[N], auditor: Auditor[U, N, B])

    modelId

    a model identifier

    defaultPolicy

    the model to use for exploitation. This MUST be deterministic for the probability to be correct. The model must return a value in the range 1 to classLabels.size (inclusive).

    epsilon

    the exploration/exploitation tradeoff parameter. epsilon must be in the interval [0, 1]. 0 indicates never select an action randomly. 1 indicates always select an action randomly.

    salt

    a function that generates a salt for the randomization layer. This salt allows the random choice of which policy to follow to be repeatable.

    classLabels

    a list of class labels to output for the final type. Also note that the size of this controls the number of actions. If the submodel returns a score < 1 or > classLabels.size (note the 1 offset) then a RuntimeException will be thrown.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def andThen[A](g: (B) ⇒ A): (A) ⇒ A

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  7. final def apply(a: A): B

    Definition Classes
    SubmodelBase → Function1
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val auditor: Auditor[U, N, B]

    Definition Classes
    EpsilonGreedyModelSubmodelBase
  10. val classLabels: IndexedSeq[N]

    a list of class labels to output for the final type.

    a list of class labels to output for the final type. Also note that the size of this controls the number of actions. If the submodel returns a score < 1 or > classLabels.size (note the 1 offset) then a RuntimeException will be thrown.

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def close(): Unit

    Definition Classes
    EpsilonGreedyModelSubmodelBase → Closeable → AutoCloseable
  13. def compose[A](g: (A) ⇒ A): (A) ⇒ B

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  14. val defaultPolicy: Submodel[Int, A, U]

    the model to use for exploitation.

    the model to use for exploitation. This MUST be deterministic for the probability to be correct. The model must return a value in the range 1 to classLabels.size (inclusive).

  15. val epsilon: Float

    the exploration/exploitation tradeoff parameter.

    the exploration/exploitation tradeoff parameter. epsilon must be in the interval [0, 1]. 0 indicates never select an action randomly. 1 indicates always select an action randomly.

  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. lazy val explorer: EpsilonGreedyExplorer[Int]

  18. def failure(errorMsgs: ⇒ Seq[String] = Nil, missingVarNames: ⇒ Set[String] = Set.empty, subvalues: Seq[U] = Nil): Subvalue[B, N]

    Attributes
    protected[this]
    Definition Classes
    SubmodelBase
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

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

    Definition Classes
    Any
  22. val modelId: ModelIdentity

    a model identifier

    a model identifier

    Definition Classes
    EpsilonGreedyModelIdentifiable
  23. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  26. val salt: GenAggFunc[A, Long]

    a function that generates a salt for the randomization layer.

    a function that generates a salt for the randomization layer. This salt allows the random choice of which policy to follow to be repeatable.

  27. def subvalue(a: A): Subvalue[B, N]

    Definition Classes
    EpsilonGreedyModelSubmodel
  28. def success(naturalValue: N, errorMsgs: ⇒ Seq[String] = Nil, missingVarNames: ⇒ Set[String] = Set.empty, subvalues: Seq[U] = Nil, prob: ⇒ Option[Float] = None): Subvalue[B, N]

    Attributes
    protected[this]
    Definition Classes
    SubmodelBase
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    Function1 → AnyRef → Any
  31. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from SubmodelBase[U, N, A, B]

Inherited from Model[A, B]

Inherited from (A) ⇒ B

Inherited from Submodel[N, A, B]

Inherited from Closeable

Inherited from AutoCloseable

Inherited from Identifiable[ModelIdentity]

Inherited from AnyRef

Inherited from Any

Ungrouped