org.apache.spark.mllib

optimization

package optimization

Visibility
  1. Public
  2. All

Type Members

  1. abstract class Gradient extends Serializable

    :: DeveloperApi :: Class used to compute the gradient for a loss function, given a single data point.

    :: DeveloperApi :: Class used to compute the gradient for a loss function, given a single data point.

    Annotations
    @DeveloperApi()
  2. class GradientDescent extends Optimizer with Logging

    Class used to solve an optimization problem using Gradient Descent.

  3. class HingeGradient extends Gradient

    :: DeveloperApi :: Compute gradient and loss for a Hinge loss function, as used in SVM binary classification.

    :: DeveloperApi :: Compute gradient and loss for a Hinge loss function, as used in SVM binary classification. See also the documentation for the precise formulation. NOTE: This assumes that the labels are {0,1}

    Annotations
    @DeveloperApi()
  4. class L1Updater extends Updater

    :: DeveloperApi :: Updater for L1 regularized problems.

    :: DeveloperApi :: Updater for L1 regularized problems. R(w) = ||w||_1 Uses a step-size decreasing with the square root of the number of iterations.

    Instead of subgradient of the regularizer, the proximal operator for the L1 regularization is applied after the gradient step. This is known to result in better sparsity of the intermediate solution.

    The corresponding proximal operator for the L1 norm is the soft-thresholding function. That is, each weight component is shrunk towards 0 by shrinkageVal.

    If w > shrinkageVal, set weight component to w-shrinkageVal. If w < -shrinkageVal, set weight component to w+shrinkageVal. If -shrinkageVal < w < shrinkageVal, set weight component to 0.

    Equivalently, set weight component to signum(w) * max(0.0, abs(w) - shrinkageVal)

    Annotations
    @DeveloperApi()
  5. class LBFGS extends Optimizer with Logging

    :: DeveloperApi :: Class used to solve an optimization problem using Limited-memory BFGS.

    :: DeveloperApi :: Class used to solve an optimization problem using Limited-memory BFGS. Reference: http://en.wikipedia.org/wiki/Limited-memory_BFGS

    Annotations
    @DeveloperApi()
  6. class LeastSquaresGradient extends Gradient

    :: DeveloperApi :: Compute gradient and loss for a Least-squared loss function, as used in linear regression.

    :: DeveloperApi :: Compute gradient and loss for a Least-squared loss function, as used in linear regression. This is correct for the averaged least squares loss function (mean squared error) L = 1/n ||A weights-y||^2 See also the documentation for the precise formulation.

    Annotations
    @DeveloperApi()
  7. class LogisticGradient extends Gradient

    :: DeveloperApi :: Compute gradient and loss for a logistic loss function, as used in binary classification.

    :: DeveloperApi :: Compute gradient and loss for a logistic loss function, as used in binary classification. See also the documentation for the precise formulation.

    Annotations
    @DeveloperApi()
  8. trait Optimizer extends Serializable

    :: DeveloperApi :: Trait for optimization problem solvers.

    :: DeveloperApi :: Trait for optimization problem solvers.

    Annotations
    @DeveloperApi()
  9. class SimpleUpdater extends Updater

    :: DeveloperApi :: A simple updater for gradient descent *without* any regularization.

    :: DeveloperApi :: A simple updater for gradient descent *without* any regularization. Uses a step-size decreasing with the square root of the number of iterations.

    Annotations
    @DeveloperApi()
  10. class SquaredL2Updater extends Updater

    :: DeveloperApi :: Updater for L2 regularized problems.

    :: DeveloperApi :: Updater for L2 regularized problems. R(w) = 1/2 ||w||^2 Uses a step-size decreasing with the square root of the number of iterations.

    Annotations
    @DeveloperApi()
  11. abstract class Updater extends Serializable

    :: DeveloperApi :: Class used to perform steps (weight update) using Gradient Descent methods.

    :: DeveloperApi :: Class used to perform steps (weight update) using Gradient Descent methods.

    For general minimization problems, or for regularized problems of the form min L(w) + regParam * R(w), the compute function performs the actual update step, when given some (e.g. stochastic) gradient direction for the loss L(w), and a desired step-size (learning rate).

    The updater is responsible to also perform the update coming from the regularization term R(w) (if any regularization is used).

    Annotations
    @DeveloperApi()

Value Members

  1. object GradientDescent extends Logging with Serializable

    :: DeveloperApi :: Top-level method to run gradient descent.

    :: DeveloperApi :: Top-level method to run gradient descent.

    Annotations
    @DeveloperApi()
  2. object LBFGS extends Logging with Serializable

    :: DeveloperApi :: Top-level method to run L-BFGS.

    :: DeveloperApi :: Top-level method to run L-BFGS.

    Annotations
    @DeveloperApi()

Ungrouped