com.eharmony.spotz.objective.vw

AbstractVwCrossValidationObjective

abstract class AbstractVwCrossValidationObjective extends Objective[Point, Double] with VwFunctions with VwCrossValidation with Logging

Perform K Fold cross validation given a dataset formatted for Vowpal Wabbit.

Linear Supertypes
Logging, VwCrossValidation, VwDatasetFunctions, FileFunctions, VwFunctions, Objective[Point, Double], Serializable, Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AbstractVwCrossValidationObjective
  2. Logging
  3. VwCrossValidation
  4. VwDatasetFunctions
  5. FileFunctions
  6. VwFunctions
  7. Objective
  8. Serializable
  9. Serializable
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractVwCrossValidationObjective(numFolds: Int, vwDataset: Iterator[String], vwTrainParamsString: Option[String], vwTestParamsString: Option[String])

    numFolds
    vwDataset
    vwTrainParamsString
    vwTestParamsString

Abstract Value Members

  1. abstract def get(name: String): File

    Definition Classes
    FileFunctions
  2. abstract def save(file: File): String

    Definition Classes
    FileFunctions

Concrete 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 apply(point: Point): Double

    This method can run on the driver and/or the executor.

    This method can run on the driver and/or the executor. It performs a k-fold cross validation over the vw input dataset passed through the class constructor. The dataset has been split in such a way that every fold has its own training and test set in the form of VW cache files.

    point

    a point object representing the hyper parameters to evaluate upon

    returns

    Double the cross validated average loss

    Definition Classes
    AbstractVwCrossValidationObjective → Objective
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. val cacheBitSize: Int

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def debug(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  11. def debug(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  12. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. def error(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  15. def error(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. val foldToVwCacheFiles: Map[Int, (String, String)]

  18. def getCache(name: String): File

    Definition Classes
    VwDatasetFunctions
  19. def getCacheBitSize(vwParamMap: Map[String, _]): Int

    Definition Classes
    VwFunctions
  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. def getTestVwParams(vwParamMap: Map[String, _], point: Point): String

    Definition Classes
    VwFunctions
  22. def getTrainVwParams(vwParamMap: Map[String, _], point: Point): String

    Definition Classes
    VwFunctions
  23. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  24. def info(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  25. def info(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  26. def isDebugEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  27. def isErrorEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  28. def isInfoEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  29. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  30. def isTraceEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  31. def isWarnEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  32. def kFold(vwDataset: Iterator[String], folds: Int, cacheBitSize: Int): Map[Int, (String, String)]

    This method takes the VW input file specified in the class constructor and partitions the file into a training set and test set for every fold.

    This method takes the VW input file specified in the class constructor and partitions the file into a training set and test set for every fold. The train and test set for every fold are then input into VW to generate cache files. These cache files are added to the SparkContext so that they'll be accessible on the executors. To keep track of the train and test set caches for every fold, a Map is used where the key is the fold number and the value is (trainingSetCachePath, testSetCachePath). These file names do NEED to be unique so that they do not collide with other file names. The entirety of this method runs on the driver. All VW input training / test set files as well as cache files are deleted upon JVM exit.

    This strategy has the downside of duplicating the dataset across every node K times. An alternative approach is to train K cache files and train the regressor K - 1 times and test on the last test cache file.

    vwDataset
    folds
    returns

    a map representation where key is the fold number and value is (trainingSetFilename, testSetFilename)

    Definition Classes
    VwCrossValidation
  33. def kFold(vwDataset: Iterable[String], folds: Int, cacheBitSize: Int): Map[Int, (String, String)]

    Definition Classes
    VwCrossValidation
  34. def kFold(inputPath: String, folds: Int, cacheBitSize: Int): Map[Int, (String, String)]

    Definition Classes
    VwCrossValidation
  35. def logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  36. def loggerName: String

    Attributes
    protected
    Definition Classes
    Logging
  37. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  40. val numFolds: Int

  41. def parseVwArgs(args: Option[String]): Map[String, Any]

    Definition Classes
    VwFunctions
  42. def save(inputIterator: Iterator[String]): String

    Definition Classes
    FileFunctions
  43. def save(inputIterable: Iterable[String]): String

    Definition Classes
    FileFunctions
  44. def save(inputPath: String): String

    Definition Classes
    FileFunctions
  45. def saveAsCache(vwDatasetPath: String, vwCacheFilename: String, bitSize: Int): String

    Definition Classes
    VwDatasetFunctions
  46. def saveAsCache(vwDatasetIterator: Iterator[String], vwCacheFilename: String, bitSize: Int): String

    Definition Classes
    VwDatasetFunctions
  47. def saveAsCache(vwDatasetInputStream: InputStream, vwCacheFilename: String, bitSize: Int): String

    Definition Classes
    VwDatasetFunctions
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  49. def toString(): String

    Definition Classes
    AnyRef → Any
  50. def trace(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  51. def trace(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging
  52. val vwDataset: Iterator[String]

  53. val vwTestParamsMap: Map[String, Any]

  54. val vwTrainParamsMap: Map[String, Any]

  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def warn(msg: ⇒ Any, t: ⇒ Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  59. def warn(msg: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    Logging

Inherited from Logging

Inherited from VwCrossValidation

Inherited from VwDatasetFunctions

Inherited from FileFunctions

Inherited from VwFunctions

Inherited from Objective[Point, Double]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped