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

Learn the distance metric base class with full set of constraints (i.e., loss function over all targets and imposters). More...

Inheritance diagram for drwnNNGraphLearner:
drwnNNGraphLLearner drwnNNGraphMLearner drwnNNGraphSparseLearner drwnNNGraphLSparseLearner

Public Member Functions

 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
 

Static Public Attributes

static double ALPHA_ZERO = 5.0e-6
 
static unsigned METRIC_ITERATIONS = 500
 
static unsigned SEARCH_ITERATIONS = 20
 

Protected Member Functions

virtual double computeObjective () const
 
virtual double computeLossFunction () 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)
 

Protected Attributes

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 full set of constraints (i.e., loss function over all targets and imposters).


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