org.apache.spark.ml.odkl

MatrixLBFGS

object MatrixLBFGS extends Logging with HasNetlibBlas with Serializable

Linear Supertypes
Serializable, Serializable, HasNetlibBlas, Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MatrixLBFGS
  2. Serializable
  3. Serializable
  4. HasNetlibBlas
  5. Logging
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def axpy(a: Double, x: Vector, y: Array[Double]): Unit

    Definition Classes
    HasNetlibBlas
  8. def axpy(a: Double, x: Array[Double], y: Array[Double]): Unit

    Definition Classes
    HasNetlibBlas
  9. def blas: BLAS

    Definition Classes
    HasNetlibBlas
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def computeGradient(data: Vector, label: Vector, weights: DenseMatrix, accumulatedGradient: DenseMatrix, accumulatedLoss: DenseVector): Unit

    Compute the gradient and loss given the features of a single data point.

    Compute the gradient and loss given the features of a single data point.

    data

    features for one data point

    label

    label for this data point

    weights

    weights/coefficients corresponding to features

    returns

    Loss vector for the current point.

  12. def computeGradientAndLoss[T](data: RDD[(Vector, T)], currentWeights: DenseMatrix, batchSize: Int = 10, labelsAssigner: (Int, T, Array[Double]) ⇒ Unit): (DenseMatrix, DenseVector)

    Computes cumulative gradient and loss for a set of samples

    Computes cumulative gradient and loss for a set of samples

    data

    RDD with vectors of features and vectors of labels

    currentWeights

    Current weights matrix.

    batchSize

    Number of samples to collect in a batch before computing.

    labelsAssigner

    Routine for extracting labels vector (in some cases only part of the labels are needed)

    returns

    Tuple with cumulative gradient matrix and loss vector

  13. def computeGradientMatrix(data: Array[Double], label: Array[Double], weights: DenseMatrix, accumulatedGradient: DenseMatrix, accumulatedLoss: DenseVector, marginCache: Array[Double], samples: Int): Unit

    Computes gradient and loss for a batch containing data and labels from multiple samples.

    Computes gradient and loss for a batch containing data and labels from multiple samples.

    data

    Samples matrix in row-major form (one row per sample)

    label

    Labels matrix in row-major form (one row per sample)

    weights

    Matrix with weights (column-major)

    accumulatedGradient

    Matrix with accumulated gradient

    accumulatedLoss

    Vector with accumulated loss

    marginCache

    Array used to cache margin calculations

    samples

    Number of samples in the batch

  14. def copy(x: Array[Double], y: Array[Double]): Unit

    Definition Classes
    HasNetlibBlas
  15. def dscal(a: Double, data: Array[Double]): Unit

    Definition Classes
    HasNetlibBlas
  16. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  18. def evaluateMaxRegularization(data: RDD[(Vector, Vector)], regulaizeLast: Boolean, numFeatures: Int, labelsMean: DenseVector, numExamples: Long): Vector

    Evaluates upper bound for regularization param for each label based on estimation from http://jmlr.

    Evaluates upper bound for regularization param for each label based on estimation from http://jmlr.org/papers/volume8/koh07a/koh07a.pdf

    data

    RDD with samples features -> labels.

    regulaizeLast

    Whenever to consider last feature as a subject for regularization (set to false to exclude intercept from regularization)

    returns

    A pair with instances count and regularization bounds.

  19. def evaluateMaxRegularization(data: DataFrame, featuresColumn: String, labelColumn: String, regulaizeLast: Boolean): (Long, Vector)

    Evaluates upper bound for regularization param for each label based on estimation from http://jmlr.

    Evaluates upper bound for regularization param for each label based on estimation from http://jmlr.org/papers/volume8/koh07a/koh07a.pdf

    data

    Dataframewith samples.

    featuresColumn

    Name of the features column

    labelColumn

    Name of the labels column.

    regulaizeLast

    Whenever to consider last feature as a subject for regularization (set to false to exclude intercept from regularization)

    returns

    A pair with instances count and regularization bounds.

  20. def f2jBLAS: BLAS

    Definition Classes
    HasNetlibBlas
  21. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

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

    Definition Classes
    Any
  25. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  26. def log: Logger

    Attributes
    protected
    Definition Classes
    Logging
  27. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  28. def logDebug(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  29. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  30. def logError(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  31. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  32. def logInfo(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  33. def logName: String

    Attributes
    protected
    Definition Classes
    Logging
  34. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  35. def logTrace(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  36. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Logging
  37. def logWarning(msg: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Logging
  38. def multiClassLBFGS(data: DataFrame, featuresColumn: String, labelColumn: String, numCorrections: Int, convergenceTol: Double, maxNumIterations: Int, batchSize: Int, regParam: Double = 0.0, regulaizeLast: Boolean = true): Map[String, Vector]

    Implementation of the matrix LBFGS algorithm.

    Implementation of the matrix LBFGS algorithm. Uses breeze implementation of the iterations and provides it with a specific cost function. The function batches requests for costs for different labels and converts to a single matrix pass.

    data

    Data fram to run on.

    featuresColumn

    Name of the column with features vector. Attribute group metadata is required

    labelColumn

    Name of the column with labels vector. Attribute group metadata is required

    numCorrections

    Number of corrections in LBFGS iteration

    convergenceTol

    Convergence tolerance for the iteration

    maxNumIterations

    Maximum number of iteration

    batchSize

    Number of samples to batch before calculating

    returns

    Map label -> trained weights vector

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

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

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

    Definition Classes
    AnyRef
  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from HasNetlibBlas

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped