Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | List of all members
drwnNNGraphSparseLearner Class Reference

Learn the distance metric base class with sparse set of constraints (i.e., loss function over further target and nearest imposter only). More...

Inheritance diagram for drwnNNGraphSparseLearner:
drwnNNGraphLearner drwnNNGraphLSparseLearner

Public Member Functions

 drwnNNGraphSparseLearner (const drwnNNGraph &graph, double lambda)
 
- Public Member Functions inherited from drwnNNGraphLearner
 drwnNNGraphLearner (const drwnNNGraph &graph, double lambda)
 
virtual void setTransform (const MatrixXd &Lt)=0
 
virtual MatrixXd getTransform () const =0
 
virtual double learn (unsigned maxCycles)
 
const drwnNNGraphgetSrcGraph () const
 
const drwnNNGraphgetPosGraph () const
 
const drwnNNGraphgetNegGraph () const
 
void clearLabelWeights ()
 
void setLabelWeights (const vector< double > &w)
 
const vector< double > & getLabelWeights () const
 

Protected Member Functions

virtual double computeLossFunction () const
 
- Protected Member Functions inherited from drwnNNGraphLearner
virtual double computeObjective () const
 
virtual MatrixXd computeSubGradient ()=0
 
virtual void subGradientStep (const MatrixXd &G, double alpha)=0
 
virtual void startMetricCycle ()
 
virtual void endMetricCycle ()
 
void updateGraphFeatures ()
 
void nearestNeighbourUpdate (unsigned nCycle, unsigned maxIterations)
 
MatrixXd initializeTransform () const
 initialize transform as feature whitener (diagonal Mahalanobis)
 

Additional Inherited Members

- Static Public Attributes inherited from drwnNNGraphLearner
static double ALPHA_ZERO = 5.0e-6
 
static unsigned METRIC_ITERATIONS = 500
 
static unsigned SEARCH_ITERATIONS = 20
 
- Protected Attributes inherited from drwnNNGraphLearner
const drwnNNGraph_graph
 
double _lambda
 
vector< double > _labelWeights
 
drwnNNGraph _posGraph
 
drwnNNGraph _negGraph
 
unsigned _dim
 feature vector dimensions
 
MatrixXd _X
 cached (x_u - x_v) (x_u - x_v)^T
 

Detailed Description

Learn the distance metric base class with sparse set of constraints (i.e., loss function over further target and nearest imposter only).


The documentation for this class was generated from the following files: