Description Usage Arguments Value Examples
Computes the gradient of the ranking logistic regression error:
f(x) = 1/|comp| sum_{(i,j)\in comp} ( log(1 + exp(- x' * (A_j - A_i) )
for a given design matrix
A
and a set of pairs (i,j)\in P where the j-th sample is larger than the i-th sample.
1 | grad.rankinglogistic(x, opts)
|
x |
A p-dimensional vector where the gradient is computed. |
opts |
List of parameters, which must include:
|
The gradient of the function f(x) = 1/|comp| sum_{(i,j)\in comp} ( log(1 + exp(- x' * (A_j - A_i) ), which is:
f'(x) = 1/|comp| sum_{(i,j)\in comp} (A_j - A_i) / (1 + exp( x' * ( A_i - A_j) )
1 | grad.rankinglogistic(c(1,3,-2), list(A=diag(3), comp=list(as.integer(c(2,3)),as.integer(3),integer(length=0))))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.