com.eharmony.spotz.objective.vw

SparkVwCrossValidationObjective

class SparkVwCrossValidationObjective extends AbstractVwCrossValidationObjective with SparkVwDatasetFunctions

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

Instance Constructors

  1. new SparkVwCrossValidationObjective(sc: SparkContext, numFolds: Int, vwDatasetPath: String, vwTrainParamsString: Option[String], vwTestParamsString: Option[String])

  2. new SparkVwCrossValidationObjective(sc: SparkContext, numFolds: Int, vwDataset: Iterable[String], vwTrainParamsString: Option[String], vwTestParamsString: Option[String])

  3. new SparkVwCrossValidationObjective(sc: SparkContext, numFolds: Int, vwDataset: Iterator[String], vwTrainParamsString: Option[String], vwTestParamsString: Option[String])

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 get(name: String): File

    Definition Classes
    SparkFileFunctions → FileFunctions
  19. def getCache(name: String): File

  20. def getCacheBitSize(vwParamMap: Map[String, _]): Int

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

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

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

    Definition Classes
    VwFunctions
  24. def hashCode(): Int

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

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

    Attributes
    protected
    Definition Classes
    Logging
  27. def isDebugEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  28. def isErrorEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  29. def isInfoEnabled: Boolean

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

    Definition Classes
    Any
  31. def isTraceEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  32. def isWarnEnabled: Boolean

    Attributes
    protected
    Definition Classes
    Logging
  33. 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
  34. def kFold(vwDataset: Iterable[String], folds: Int, cacheBitSize: Int): Map[Int, (String, String)]

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

    Definition Classes
    VwCrossValidation
  36. def logger: Logger

    Attributes
    protected
    Definition Classes
    Logging
  37. def loggerName: String

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

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

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

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

    Definition Classes
    VwFunctions
  42. def save(file: File): String

    Definition Classes
    SparkFileFunctions → FileFunctions
  43. def save(inputIterator: Iterator[String]): String

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

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

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

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

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

    Definition Classes
    VwDatasetFunctions
  49. val sc: SparkContext

    Definition Classes
    SparkVwCrossValidationObjective → SparkFileFunctions
  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def toString(): String

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

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

    Attributes
    protected
    Definition Classes
    Logging
  54. val vwTestParamsMap: Map[String, Any]

  55. val vwTrainParamsMap: Map[String, Any]

  56. final def wait(): Unit

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging

Inherited from SparkVwDatasetFunctions

Inherited from SparkFileFunctions

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