SHOGUN v0.9.0
公有成员 | 保护成员
CJensenMetric类参考

详细描述

class JensenMetric

The Jensen-Shannon distance/divergence measures the similarity between two data points which is based on the Kullback-Leibler divergence.

\[\displaystyle d(\bf{x},\bf{x'}) = \sum_{i=0}^{n} x_{i} log\frac{x_{i}}{0.5(x_{i} +x'_{i})} + x'_{i} log\frac{x'_{i}}{0.5(x_{i}+x'_{i})} \]

参见:
Wikipedia: Jensen-Shannon divergence
Wikipedia: Kullback-Leibler divergence

在文件JensenMetric.h35行定义。

继承图,类CJensenMetric
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CJensenMetric ()
 CJensenMetric (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r)
virtual ~CJensenMetric ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual void cleanup ()
virtual EDistanceType get_distance_type ()
virtual const char * get_name () const

保护成员

virtual float64_t compute (int32_t idx_a, int32_t idx_b)

构造及析构函数文档

default constructor

在文件JensenMetric.cpp20行定义。

constructor

参数:
lfeatures of left-hand side
rfeatures of right-hand side

在文件JensenMetric.cpp24行定义。

~CJensenMetric ( ) [virtual]

在文件JensenMetric.cpp30行定义。


成员函数文档

void cleanup ( ) [virtual]

cleanup distance

实现了CSimpleDistance< float64_t >

在文件JensenMetric.cpp40行定义。

float64_t compute ( int32_t  idx_a,
int32_t  idx_b 
) [protected, virtual]

compute distance for features a and b idx_{a,b} denote the index of the feature vectors in the corresponding feature object

实现了CDistance

在文件JensenMetric.cpp44行定义。

virtual EDistanceType get_distance_type ( ) [virtual]

get distance type we are

返回:
distance type JENSEN

实现了CSimpleDistance< float64_t >

在文件JensenMetric.h64行定义。

virtual const char* get_name ( void  ) const [virtual]

get name of the distance

返回:
name Jensen-Metric

重载CSimpleDistance< float64_t >

在文件JensenMetric.h70行定义。

bool init ( CFeatures l,
CFeatures r 
) [virtual]

init distance

参数:
lfeatures of left-hand side
rfeatures of right-hand side
返回:
if init was successful

重载CSimpleDistance< float64_t >

在文件JensenMetric.cpp35行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation