Class

com.github.nearbydelta.deepspark.train

TrainingParam

Related Doc: package train

Permalink

case class TrainingParam(maxIter: Int = 100, waitAfterUpdate: Int = 1, improveThreshold: Double = 0.999999, lossThreshold: Double = 0.0001, validationFreq: Double = 1.0, miniBatch: Int = 10, reuseSaveData: Boolean = false, dataOnLocal: Boolean = false, storageLevel: StorageLevel = StorageLevel.MEMORY_ONLY) extends Serializable with Product

Criteria: When to stop training

This case class defines when to stop training. Training stops if one of the following condition is satisfied.

- #Iteration ≥ maxIter

Validation is done for each validationFreq iterations, and whenever current/best loss ratio below improveThreshold, that iteration is marked as best iteration.

maxIter

maximum iteration count (default 100,000)

waitAfterUpdate

multiplier for calculating patience (default 1 := Wait lastupdate# * 1 after update)

improveThreshold

threshold that iteration is marked as "improved" (default 99.5% = 0.995)

lossThreshold

maximum-tolerant loss value. (default 0.0001)

validationFreq

multiplier used for count for validation. (default 1.0) Validation checked whenever (validationFreq) * (#epoch for 1 training batch). where #epoch for 1 iteration = round(1 / miniBatchFraction).

miniBatch

size of mini-batch. (default 10)

reuseSaveData

True if this trainer reuse previous temp data in disk. (default false)

dataOnLocal

True if want to collect all the data into the driver. (default false)

storageLevel

Persist level (default MEMORY_ONLY)

Linear Supertypes
Product, Equals, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TrainingParam
  2. Product
  3. Equals
  4. Serializable
  5. Serializable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TrainingParam(maxIter: Int = 100, waitAfterUpdate: Int = 1, improveThreshold: Double = 0.999999, lossThreshold: Double = 0.0001, validationFreq: Double = 1.0, miniBatch: Int = 10, reuseSaveData: Boolean = false, dataOnLocal: Boolean = false, storageLevel: StorageLevel = StorageLevel.MEMORY_ONLY)

    Permalink

    maxIter

    maximum iteration count (default 100,000)

    waitAfterUpdate

    multiplier for calculating patience (default 1 := Wait lastupdate# * 1 after update)

    improveThreshold

    threshold that iteration is marked as "improved" (default 99.5% = 0.995)

    lossThreshold

    maximum-tolerant loss value. (default 0.0001)

    validationFreq

    multiplier used for count for validation. (default 1.0) Validation checked whenever (validationFreq) * (#epoch for 1 training batch). where #epoch for 1 iteration = round(1 / miniBatchFraction).

    miniBatch

    size of mini-batch. (default 10)

    reuseSaveData

    True if this trainer reuse previous temp data in disk. (default false)

    dataOnLocal

    True if want to collect all the data into the driver. (default false)

    storageLevel

    Persist level (default MEMORY_ONLY)

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. val dataOnLocal: Boolean

    Permalink

    True if want to collect all the data into the driver.

    True if want to collect all the data into the driver. (default false)

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

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. val improveThreshold: Double

    Permalink

    threshold that iteration is marked as "improved" (default 99.5% = 0.995)

  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val lossThreshold: Double

    Permalink

    maximum-tolerant loss value.

    maximum-tolerant loss value. (default 0.0001)

  13. val maxIter: Int

    Permalink

    maximum iteration count (default 100,000)

  14. val miniBatch: Int

    Permalink

    size of mini-batch.

    size of mini-batch. (default 10)

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  18. val reuseSaveData: Boolean

    Permalink

    True if this trainer reuse previous temp data in disk.

    True if this trainer reuse previous temp data in disk. (default false)

  19. val storageLevel: StorageLevel

    Permalink

    Persist level (default MEMORY_ONLY)

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. val validationFreq: Double

    Permalink

    multiplier used for count for validation.

    multiplier used for count for validation. (default 1.0) Validation checked whenever (validationFreq) * (#epoch for 1 training batch). where #epoch for 1 iteration = round(1 / miniBatchFraction).

  22. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. val waitAfterUpdate: Int

    Permalink

    multiplier for calculating patience (default 1 := Wait lastupdate# * 1 after update)

Inherited from Product

Inherited from Equals

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped