GURLS++  2.0.00
C++ Implementation of GURLS Matlab Toolbox
utils.h File Reference

Utility functions. More...

#include <map>
#include <algorithm>
#include "gurls++/gmath.h"
#include "gurls++/gmat2d.h"
#include "gurls++/optlist.h"
#include "gurls++/optfunction.h"
#include "gurls++/optmatrix.h"
#include "gurls++/primal.h"
#include "gurls++/macroavg.h"
#include <set>
#include <boost/random/normal_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gurls::LtCompare< T >
 Auxiliary class performing floating point comparison used for std routines. More...

Namespaces

namespace  gurls
 

The main namespace of GURLS++.


Functions

template<typename T >
void gurls::distance (const T *A, const T *B, const int rows, const int A_cols, const int B_cols, T *D)
 Utility function used to build the kernel matrix; it computes the matrix of the squared euclidean distance between each column of A and each colum of B.
template<typename T >
void gurls::distance_transposed (const T *A, const T *B, const int cols, const int A_rows, const int B_rows, T *D)
 Utility function used to build the kernel matrix; it computes the matrix of the squared euclidean distance between each row of A and each row of B.
template<typename T >
void gurls::distance_transposed_vm (const T *A, const T *B, const int cols, const int B_rows, T *D, const int size, const int incrA=1)
 Utility function used to build the kernel matrix; it computes the matrix of the squared euclidean distance between a vector A and each row of B.
template<typename T >
void gurls::GInverseDiagonal (const T *Q, const T *L, const T *lambda, T *Z, const int Q_rows, const int Q_cols, const int L_length, const int lambda_length)
template<typename T >
void gurls::GInverseDiagonal (const T *Q, const T *L, const T *lambda, T *Z, const int Q_rows, const int Q_cols, const int L_length, const int lambda_length, T *work)
template<typename T >
gurls::precrec_driver (const T *out, const T *gt, const unsigned long N, T *work)
 Utility function called by the class PrecisionRecall to evaluate the average precision through precision and recall.
template<typename T >
gurls::precrec_driver (const T *out, const T *gt, const unsigned long N)
 Utility function called by the class PrecisionRecall to evaluate the average precision through precision and recall.
template<typename T >
void gurls::random_svd (const T *A, const unsigned long A_rows, const unsigned long A_cols, T *U, T *S, T *V, unsigned long k=6, unsigned long its=2, unsigned long l=0)
 Constructs a nearly optimal rank-k approximation USV' to A, using its full iterations of a block Lanczos method of block size l, started with an n x l random matrix, when A is m x n;.
template<typename T >
GurlsOptionsList * gurls::rls_pegasos_driver (const T *X, const T *bY, const GurlsOptionsList &opt, const int X_rows, const int X_cols, const int bY_rows, const int bY_cols)
 Utility function called by the class RLSPegasos to implement a single pass for pegasos algorithm, performing the stochastic gradient descent over all training samples once.
template<typename T >
gMat2D< T > * gurls::rls_primal_driver (T *K, const T *Xty, const unsigned long n, const unsigned long d, const unsigned long Yd, const T lambda)
template<typename T >
gMat2D< T > * gurls::rp_apply_real (const T *X, const T *W, const unsigned long n, const unsigned long d, const unsigned long D)
template<typename T >
gMat2D< T > * gurls::rp_apply_real (const gMat2D< T > &X, const gMat2D< T > &W)
template<typename T >
gMat2D< T > * gurls::rp_factorize_large_real (const gMat2D< T > &X, const gMat2D< T > &y, const unsigned long D, const unsigned long psize, T *XtX, T *Xty)
template<typename T >
gMat2D< T > * gurls::rp_projections (const unsigned long d, const unsigned long D)
template<typename T >
gurls::test_classifier (T *W, GurlsOptionsList &opt, const int rows, const int cols)
 Utility function called by the rls_pegasos_driver; it evaluate classification accuracy on the test set given in fields Xte and yte of opt.

Detailed Description

Definition in file utils.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends