Object/Class

org.apache.spark.ml.odkl

MatrixLBFGS

Related Docs: class MatrixLBFGS | package odkl

Permalink

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
Visibility
  1. Public
  2. All

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 axpy(a: Double, x: Vector, y: Array[Double]): Unit

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

    Permalink
    Definition Classes
    HasNetlibBlas
  7. def blas: BLAS

    Permalink
    Definition Classes
    HasNetlibBlas
  8. def clone(): AnyRef

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

    Permalink

    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.

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

    Permalink

    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

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

    Permalink

    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

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

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

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

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

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

    Permalink

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

    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.

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

    Permalink

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

    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.

  18. def f2jBLAS: BLAS

    Permalink
    Definition Classes
    HasNetlibBlas
  19. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

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

    Permalink
    Definition Classes
    Any
  24. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. def log: Logger

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. def logName: String

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  37. 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]

    Permalink

    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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  42. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from HasNetlibBlas

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped