Package model_descriptions :: Module full_gradient
[hide private]
[frames] | no frames]

Module full_gradient

source code

This module contains non incremental (batch or full gradient) functions.

Functions [hide private]
 
ell2_full_gradient(w, cur_grad, x, y)
Calculates ell2 gradient.
source code
 
ell2_gradient_step(w, grad, stepsize, mu, B)
Computes w as a step
source code
 
svm_full_gradient(w, cur_grad, x, y)
Calculates svm gradient.
source code
 
ell2_prox_term(w, cur_grad, stepsize, mu, B)
Computes w as a step
source code
 
logit_l1_sparse(w, cur_grad, x_indexes, x_vectors, y)
Calculates logit l1 sparse
source code
 
l1_shrink_prox(w, cur_grad, stepsize, mu, B)
Computes l1 shrink prox
source code
double
logit_loss(w, x_indexes, x_values, y)
Returns logit loss
source code
Function Details [hide private]

ell2_full_gradient(w, cur_grad, x, y)

source code 

Calculates ell2 gradient.

Parameters:
  • w (vector) - model vector
  • cur_grad (vector) - current gradient
  • x (vector) - feature vector of the example
  • y (number) - label of the example

ell2_gradient_step(w, grad, stepsize, mu, B)

source code 

Computes w as a step

Parameters:
  • w (vector) - model vector
  • grad (vector) - gradient
  • stepsize (double) - step size
  • mu (double) - mu
  • B (double) - B

svm_full_gradient(w, cur_grad, x, y)

source code 

Calculates svm gradient.

Parameters:
  • w (vector) - model vector
  • cur_grad (vector) - current gradient
  • x (vector) - feature vector of the example
  • y (number) - label of the example

ell2_prox_term(w, cur_grad, stepsize, mu, B)

source code 

Computes w as a step

Parameters:
  • w (vector) - model vector
  • cur_grad (vector) - gradient
  • stepsize (double) - step size
  • mu (double) - mu
  • B (double) - B

logit_l1_sparse(w, cur_grad, x_indexes, x_vectors, y)

source code 

Calculates logit l1 sparse

Parameters:
  • w (vector) - model vector
  • cur_grad (vector) - current gradient
  • x_indexes (vector) - indexes vector of the example
  • x_vectors (vector) - values of the feature vector of the example
  • y (number) - label of the example

l1_shrink_prox(w, cur_grad, stepsize, mu, B)

source code 

Computes l1 shrink prox

Parameters:
  • w (vector) - model vector
  • cur_grad (vector) - gradient
  • stepsize (double) - step size
  • mu (double) - mu
  • B (double) - B

logit_loss(w, x_indexes, x_values, y)

source code 

Returns logit loss

Parameters:
  • w (vector) - model vector
  • x_indexes (vector) - indexes vector of the example
  • x_values (vector) - values of the feature vector of the example
Returns: double
logit loss of the given model and the example