org.apache.spark.ml.odkl

LinearMatrixDSVRGD

class LinearMatrixDSVRGD extends DSVRGD[LinearCombinationModel[LinearRegressionModel]]

Multi-label linear regresion with DSVRGD

Linear Supertypes
DSVRGD[LinearCombinationModel[LinearRegressionModel]], HasCacheTrainData, HasTol, HasMaxIter, HasNetlibBlas, HasElasticNetParam, HasRegParam, HasLabelCol, HasFeaturesCol, HasPredictionCol, SummarizableEstimator[LinearCombinationModel[LinearRegressionModel]], Estimator[LinearCombinationModel[LinearRegressionModel]], PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LinearMatrixDSVRGD
  2. DSVRGD
  3. HasCacheTrainData
  4. HasTol
  5. HasMaxIter
  6. HasNetlibBlas
  7. HasElasticNetParam
  8. HasRegParam
  9. HasLabelCol
  10. HasFeaturesCol
  11. HasPredictionCol
  12. SummarizableEstimator
  13. Estimator
  14. PipelineStage
  15. Logging
  16. Params
  17. Serializable
  18. Serializable
  19. Identifiable
  20. AnyRef
  21. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LinearMatrixDSVRGD()

  2. new LinearMatrixDSVRGD(uid: 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 $[T](param: Param[T]): T

    Attributes
    protected
    Definition Classes
    Params
  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. def addGradient(weights: Matrix, features: DenseMatrix, labels: DenseMatrix, updateTerm: DenseMatrix, marginCache: DenseMatrix, lossCache: DenseVector): Unit

    For single instance and weights calculates gradient and loss.

    For single instance and weights calculates gradient and loss. Depending on direction adds gradient and loss to the accumulated data.

    weights

    Weights to evaluate gradient at

    features

    Featrues of instance to evaluate gradient at

    labels

    Labels of the instance to evaluate gradient at

    updateTerm

    Update term to store gradient at

    lossCache

    Loss vector to record resulting loss values.

    Attributes
    protected
    Definition Classes
    LinearMatrixDSVRGDDSVRGD
  8. def addL1Reg(l1regParam: Vector, weights: DenseMatrix, updateTerm: DenseMatrix, lossCache: DenseVector, skipRegFeature: Int): DenseMatrix

    Attributes
    protected
    Definition Classes
    DSVRGD
  9. def addL2Reg(l2regParam: Vector, weights: DenseMatrix, updateTerm: DenseMatrix, lossCache: DenseVector, skipRegFeature: Int): DenseMatrix

    Adds L2 regularization part to the gradient and loss.

    Adds L2 regularization part to the gradient and loss.

    Attributes
    protected
    Definition Classes
    DSVRGD
  10. def adjust(direction: Int, learningRates: DenseMatrix, updateTerm: DenseMatrix, weights: DenseMatrix): DenseMatrix

    Definition Classes
    DSVRGD
  11. def applyL1Shrinkage(regParam: Vector, weights: DenseMatrix, skipRegFeature: Int, notDegraded: Set[Int]): DenseMatrix

    Apply L1 shrinkage to the updated weights.

    Apply L1 shrinkage to the updated weights.

    Attributes
    protected
    Definition Classes
    DSVRGD
  12. final def asInstanceOf[T0]: T0

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

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

    Definition Classes
    HasNetlibBlas
  15. def axpyCompensated(updateTerm: Array[Double], sum: Array[Double], compensator: Array[Double], y: Array[Double], t: Array[Double]): Unit

    Definition Classes
    DSVRGD
  16. def blas: BLAS

    Definition Classes
    HasNetlibBlas
  17. final val cacheTrainData: BooleanParam

    Definition Classes
    HasCacheTrainData
  18. final def clear(param: Param[_]): LinearMatrixDSVRGD.this.type

    Definition Classes
    Params
  19. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. val convergenceMode: Param[String]

    Definition Classes
    DSVRGD
  21. def copy(extra: ParamMap): DSVRGD[LinearCombinationModel[LinearRegressionModel]]

    Definition Classes
    DSVRGDSummarizableEstimator → Estimator → PipelineStage → Params
  22. def copy(x: Array[Double], y: Array[Double]): Unit

    Definition Classes
    HasNetlibBlas
  23. def copyValues[T <: Params](to: T, extra: ParamMap): T

    Attributes
    protected
    Definition Classes
    Params
  24. final def defaultCopy[T <: Params](extra: ParamMap): T

    Attributes
    protected
    Definition Classes
    Params
  25. def dscal(a: Double, data: Array[Double]): Unit

    Definition Classes
    HasNetlibBlas
  26. final val elasticNetParam: DoubleParam

    Definition Classes
    HasElasticNetParam
  27. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  29. def evaluateL1Regularization(data: DataFrame, l1Scalar: Double, numLabels: Int): Vector

    Given L1 regularization config create a vector with per-label reg param (by default - constant).

    Given L1 regularization config create a vector with per-label reg param (by default - constant).

    Attributes
    protected
    Definition Classes
    DSVRGD
  30. def evaluateL2Regularization(data: DataFrame, l2Scalar: Double, numLabels: Int): Vector

    Given L2 regularization config create a vector with per-label reg param (by default - constant).

    Given L2 regularization config create a vector with per-label reg param (by default - constant).

    Attributes
    protected
    Definition Classes
    DSVRGD
  31. def explainParam(param: Param[_]): String

    Definition Classes
    Params
  32. def explainParams(): String

    Definition Classes
    Params
  33. def extractBlock(lossHistory: Array[CompactBuffer[Double]], dataset: DataFrame, names: Map[Int, String], sc: SparkContext): DataFrame

    Definition Classes
    DSVRGD
  34. def extractLabelVectors(labelAttributeGroup: AttributeGroup, numLabels: Int, weights: Matrix): Map[String, Vector]

    Utility used to split weights matrice into label -> vector map

    Utility used to split weights matrice into label -> vector map

    Attributes
    protected
    Definition Classes
    DSVRGD
  35. def extractModel(labelAttributeGroup: AttributeGroup, numLabels: Int, weights: Matrix, dataset: DataFrame): LinearCombinationModel[LinearRegressionModel]

    Given labels info and weights matrice create appropriate ML models.

    Given labels info and weights matrice create appropriate ML models.

    Attributes
    protected
    Definition Classes
    LinearMatrixDSVRGDDSVRGD
  36. final def extractParamMap(): ParamMap

    Definition Classes
    Params
  37. final def extractParamMap(extra: ParamMap): ParamMap

    Definition Classes
    Params
  38. def extractRow(label: Int, weights: Matrix): Vector

    Extracts a single row from a matrice.

    Extracts a single row from a matrice.

    Attributes
    protected
    Definition Classes
    DSVRGD
  39. def extractSummaryBlocks(lossHistory: Array[CompactBuffer[Double]], weightDiffHistory: Array[CompactBuffer[Double]], weightNormHistory: Array[CompactBuffer[Double]], dataset: DataFrame, labelAttributeGroup: AttributeGroup): Map[Block, DataFrame]

    Extracts summary blocks from iterations loss history.

    Extracts summary blocks from iterations loss history.

    Attributes
    protected
    Definition Classes
    DSVRGD
  40. def f2jBLAS: BLAS

    Definition Classes
    HasNetlibBlas
  41. final val featuresCol: Param[String]

    Definition Classes
    HasFeaturesCol
  42. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  43. def fit(dataset: DataFrame): LinearCombinationModel[LinearRegressionModel]

    Definition Classes
    DSVRGD → Estimator
  44. def fit(dataset: DataFrame, paramMaps: Array[ParamMap]): Seq[LinearCombinationModel[LinearRegressionModel]]

    Definition Classes
    Estimator
  45. def fit(dataset: DataFrame, paramMap: ParamMap): LinearCombinationModel[LinearRegressionModel]

    Definition Classes
    Estimator
  46. def fit(dataset: DataFrame, firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): LinearCombinationModel[LinearRegressionModel]

    Definition Classes
    Estimator
    Annotations
    @varargs()
  47. def fullGradientAndLoss(l1regParam: Vector, l2regParam: Vector, localWeights: DenseMatrix, marginCache: DenseMatrix, lossCache: DenseVector, updateTerm: DenseMatrix, skipRegFeature: Int, features: DenseMatrix, labels: DenseMatrix): Any

    Definition Classes
    DSVRGD
  48. final def get[T](param: Param[T]): Option[T]

    Definition Classes
    Params
  49. final def getCacheTrainData: Boolean

    Definition Classes
    HasCacheTrainData
  50. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  51. final def getDefault[T](param: Param[T]): Option[T]

    Definition Classes
    Params
  52. final def getElasticNetParam: Double

    Definition Classes
    HasElasticNetParam
  53. final def getFeaturesCol: String

    Definition Classes
    HasFeaturesCol
  54. final def getLabelCol: String

    Definition Classes
    HasLabelCol
  55. final def getMaxIter: Int

    Definition Classes
    HasMaxIter
  56. def getNotConverged(activeLabels: Map[Int, Int], lossHistory: Array[CompactBuffer[Double]], weightDiffHistory: Array[CompactBuffer[Double]], weightNormHistory: Array[CompactBuffer[Double]], tolerance: Double): Array[Int]

    Extracts not converged labels based on actual and previous weights and on the loss history.

    Extracts not converged labels based on actual and previous weights and on the loss history.

    Attributes
    protected
    Definition Classes
    DSVRGD
  57. final def getOrDefault[T](param: Param[T]): T

    Definition Classes
    Params
  58. def getParam(paramName: String): Param[Any]

    Definition Classes
    Params
  59. final def getPredictionCol: String

    Definition Classes
    HasPredictionCol
  60. final def getRegParam: Double

    Definition Classes
    HasRegParam
  61. final def getTol: Double

    Definition Classes
    HasTol
  62. final def hasDefault[T](param: Param[T]): Boolean

    Definition Classes
    Params
  63. def hasParam(paramName: String): Boolean

    Definition Classes
    Params
  64. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  65. def initializeWeights(data: DataFrame, numLabels: Int, numFeatures: Int): Matrix

    Definition Classes
    DSVRGD
  66. final def isDefined(param: Param[_]): Boolean

    Definition Classes
    Params
  67. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  68. final def isSet(param: Param[_]): Boolean

    Definition Classes
    Params
  69. def isTraceEnabled(): Boolean

    Attributes
    protected
    Definition Classes
    Logging
  70. final val labelCol: Param[String]

    Definition Classes
    HasLabelCol
  71. val lastIsIntercept: BooleanParam

    Definition Classes
    DSVRGD
  72. val learningRate: DoubleParam

    Definition Classes
    DSVRGD
  73. val localMinibatchSize: Param[Int]

    Definition Classes
    DSVRGD
  74. def log: Logger

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

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  81. def logName: String

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

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

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

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

    Attributes
    protected
    Definition Classes
    Logging
  86. def lossDifferenceForLabel(lossHistory: Array[CompactBuffer[Double]], label: Int): Double

    Evaluates loss difference simply as relative change

    Evaluates loss difference simply as relative change

    Definition Classes
    DSVRGD
  87. val lossIncreaseTolerance: DoubleParam

    Definition Classes
    DSVRGD
  88. final val maxIter: IntParam

    Definition Classes
    HasMaxIter
  89. def merge(labelsMap: Map[Int, Int], weights: Matrix, newWeights: DenseMatrix): DenseMatrix

    Merges weights from the new epoch with overal weights.

    Merges weights from the new epoch with overal weights. Dimensions of weights matrices might be different when part of labels are already converged and do not participate in descend.

    Attributes
    protected
    Definition Classes
    DSVRGD
  90. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  93. lazy val params: Array[Param[_]]

    Definition Classes
    Params
  94. final val predictionCol: Param[String]

    Definition Classes
    HasPredictionCol
  95. final val regParam: DoubleParam

    Definition Classes
    HasRegParam
  96. def relabel(activeLabels: Array[Int], labels: Vector): DenseVector

    Used to preserve only active (not yet converged) labels into a vector

    Used to preserve only active (not yet converged) labels into a vector

    Attributes
    protected
    Definition Classes
    DSVRGD
  97. def relabelMatrix(activeLabels: Array[Int], matrix: Matrix): Matrix

    Used to preserve only active (not yet converged) labels into a matrix

    Used to preserve only active (not yet converged) labels into a matrix

    Attributes
    protected
    Definition Classes
    DSVRGD
  98. final def set(paramPair: ParamPair[_]): LinearMatrixDSVRGD.this.type

    Attributes
    protected
    Definition Classes
    Params
  99. final def set(param: String, value: Any): LinearMatrixDSVRGD.this.type

    Attributes
    protected
    Definition Classes
    Params
  100. final def set[T](param: Param[T], value: T): LinearMatrixDSVRGD.this.type

    Definition Classes
    Params
  101. def setCacheTrainData(value: Boolean): LinearMatrixDSVRGD.this.type

    Definition Classes
    HasCacheTrainData
  102. def setConvergenceMode(value: String): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  103. final def setDefault(paramPairs: ParamPair[_]*): LinearMatrixDSVRGD.this.type

    Attributes
    protected
    Definition Classes
    Params
  104. final def setDefault[T](param: Param[T], value: T): LinearMatrixDSVRGD.this.type

    Attributes
    protected
    Definition Classes
    Params
  105. def setElasticNetParam(value: Double): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  106. def setLastIsIntercept(value: Boolean): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  107. def setLearningRate(value: Double): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  108. def setLocalMinibatchSize(value: Int): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  109. def setMaxIter(value: Int): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  110. def setRegParam(value: Double): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  111. def setSlowDownFactor(value: Double): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  112. def setSpeedUpFactor(value: Double): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  113. def setTol(value: Double): LinearMatrixDSVRGD.this.type

    Definition Classes
    DSVRGD
  114. def singleStep(data: RDD[(Vector, DenseVector)], weights: Broadcast[Matrix], avgWeights: Broadcast[Matrix], avgGradient: Broadcast[Matrix], l1regParam: Vector, l2regParam: Vector, stepNum: Int, labelLearningRates: DenseVector): DistributedSgdState

    Single epoch of the descend

    Single epoch of the descend

    data

    Data with features and labels

    weights

    Weghts matrix to start with.

    avgWeights

    Average weights among walked during previous epoch.

    avgGradient

    Average gradient among seen during previous epoch.

    l1regParam

    Vector with the strength of L1 regularization (null if disabled)

    l2regParam

    Vector with the strength of L2 regularization (null if disabled)

    stepNum

    Number of epoch

    returns

    State with weights, averages and loss from this epoch

    Attributes
    protected
    Definition Classes
    DSVRGD
  115. val slowDownFactor: DoubleParam

    Definition Classes
    DSVRGD
  116. val speedUpFactor: DoubleParam

    Definition Classes
    DSVRGD
  117. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  118. def toDense(weights: Broadcast[Matrix]): DenseMatrix

    Definition Classes
    DSVRGD
  119. def toString(): String

    Definition Classes
    Identifiable → AnyRef → Any
  120. final val tol: DoubleParam

    Definition Classes
    HasTol
  121. def transformSchema(schema: StructType): StructType

    Definition Classes
    DSVRGD → PipelineStage
    Annotations
    @DeveloperApi()
  122. def transformSchema(schema: StructType, logging: Boolean): StructType

    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  123. val uid: String

    Definition Classes
    LinearMatrixDSVRGDDSVRGD → Identifiable
  124. def updateWeights(stepSize: Double, updateTerm: DenseMatrix, weights: DenseMatrix): Unit

    Updates the weights given update term and current value.

    Updates the weights given update term and current value.

    Attributes
    protected
    Definition Classes
    DSVRGD
  125. def validateParams(): Unit

    Definition Classes
    Params
  126. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  129. def weightNorm(newWeights: Matrix, label: Int, skipRegFeature: Int): Double

    Evaluates weight norm for a given label.

    Evaluates weight norm for a given label.

    newWeights

    Weights matrix

    label

    Label to evaluate weights

    returns

    Weights norm.

    Attributes
    protected
    Definition Classes
    DSVRGD
  130. def weightsDistanceForLabel(oldWeights: Matrix, newWeights: DenseMatrix, label: Int): Double

    Evaluates weight distance based on old and new weights images.

    Evaluates weight distance based on old and new weights images.

    oldWeights

    Weights from the previous epoch

    newWeights

    Weights from the current epoch.

    label

    Label to check for convergence.

    returns

    Distance between old and new weights.

    Attributes
    protected
    Definition Classes
    LinearMatrixDSVRGDDSVRGD

Inherited from HasCacheTrainData

Inherited from HasTol

Inherited from HasMaxIter

Inherited from HasNetlibBlas

Inherited from HasElasticNetParam

Inherited from HasRegParam

Inherited from HasLabelCol

Inherited from HasFeaturesCol

Inherited from HasPredictionCol

Inherited from Estimator[LinearCombinationModel[LinearRegressionModel]]

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

getParam

Ungrouped