SHOGUN v0.9.0
|
Pyramid Kernel over Chi2 matched histograms.
在文件PyramidChi2.h第28行定义。
公有成员 | |
CPyramidChi2 (void) | |
CPyramidChi2 (int32_t size, int32_t num_cells2, float64_t *weights_foreach_cell2, int32_t width_computation_type2, float64_t width2) | |
CPyramidChi2 (CSimpleFeatures< float64_t > *l, CSimpleFeatures< float64_t > *r, int32_t size, int32_t num_cells2, float64_t *weights_foreach_cell2, int32_t width_computation_type2, float64_t width2) | |
virtual bool | init (CFeatures *l, CFeatures *r) |
virtual | ~CPyramidChi2 () |
virtual void | cleanup () |
virtual EKernelType | get_kernel_type () |
virtual const char * | get_name () const |
virtual void | setparams_pychi2 (int32_t num_cells2, float64_t *weights_foreach_cell2, int32_t width_computation_type2, float64_t width2) |
保护成员 | |
virtual float64_t | compute (int32_t idx_a, int32_t idx_b) |
保护属性 | |
int32_t | num_cells |
float64_t * | weights |
int32_t | width_computation_type |
float64_t | width |
int32_t | num_randfeats_forwidthcomputation |
CPyramidChi2 | ( | void | ) |
default constructor protected to avoid its usage
在文件PyramidChi2.cpp第21行定义。
CPyramidChi2 | ( | int32_t | size, |
int32_t | num_cells2, | ||
float64_t * | weights_foreach_cell2, | ||
int32_t | width_computation_type2, | ||
float64_t | width2 | ||
) |
constructor
size | cache size in MB |
num_cells2 | - the number of pyramid cells |
weights_foreach_cell2 | the vector of weights for each cell with which the Chi2 distance gets weighted |
width_computation_type2 | - 0 use the following parameter as fixed width, 1- use mean of inner distances in cases 1 and 2 the value of parameter width is still important, see parameter width2 |
width2 | - in case of width_computation_type ==0 it is the width, in case of width_computation_type > 0 its value determines the how many random features are used for determining the width in case of width_computation_type > 0 set width2 <=1 to use all LEFT HAND SIDE features for width estimation |
在文件PyramidChi2.cpp第31行定义。
CPyramidChi2 | ( | CSimpleFeatures< float64_t > * | l, |
CSimpleFeatures< float64_t > * | r, | ||
int32_t | size, | ||
int32_t | num_cells2, | ||
float64_t * | weights_foreach_cell2, | ||
int32_t | width_computation_type2, | ||
float64_t | width2 | ||
) |
constructor
l | features lhs convention: concatenated features along all cells, i.e. [feature for cell1, feature for cell2, ... feature for last cell] , the dimensionality of the base feature is equal to dividing the total feature length by the number ofcells |
r | features rhs the same convention as for param l applies here |
size | cache size |
num_cells2 | - the number of pyramid cells |
weights_foreach_cell2 | the vector of weights for each cell with which the Chi2 distance gets weighted |
width_computation_type2 | - 0 use the following parameter as fixed width, 1- use mean of inner distances in case 1 the value of parameter width is important!!! |
width2 | - in case of width_computation_type ==0 it is the width, in case of width_computation_type > 0 its value determines the how many random features are used for determining the width in case of width_computation_type > 0 set width2 <=1 to use all LEFT HAND SIDE features for width estimation |
在文件PyramidChi2.cpp第83行定义。
~CPyramidChi2 | ( | ) | [virtual] |
在文件PyramidChi2.cpp第115行定义。
void cleanup | ( | ) | [virtual] |
float64_t compute | ( | int32_t | idx_a, |
int32_t | idx_b | ||
) | [protected, virtual] |
compute kernel function for features a and b
idx_a | index of feature vector a |
idx_b | index of feature vector b |
重载CDotKernel。
在文件PyramidChi2.cpp第122行定义。
virtual EKernelType get_kernel_type | ( | ) | [virtual] |
return what type of kernel we are Linear,Polynomial, Gaussian,...
实现了CDotKernel。
在文件PyramidChi2.h第92行定义。
virtual const char* get_name | ( | void | ) | const [virtual] |
void setparams_pychi2 | ( | int32_t | num_cells2, |
float64_t * | weights_foreach_cell2, | ||
int32_t | width_computation_type2, | ||
float64_t | width2 | ||
) | [virtual] |
sets parameters, see also constructor
num_cells2 | - the number of pyramid cells |
weights_foreach_cell2 | the vector of weights for each cell with which the Chi2 distance gets weighted |
width_computation_type2 | - 0 use the following parameter as fixed width, 1- use mean of inner distances in cases 1 and 2 the value of parameter width is still important, see parameter width2 |
width2 | - in case of width_computation_type ==0 it is the width, in case of width_computation_type > 0 its value determines the how many random features are used for determining the width in case of width_computation_type > 0 set width2 <=1 to use all LEFT HAND SIDE features for width estimation |
在文件PyramidChi2.cpp第242行定义。
int32_t num_cells [protected] |
number of pyramidcells across all pyramidlevel
在文件PyramidChi2.h第131行定义。
int32_t num_randfeats_forwidthcomputation [protected] |
in case of adaptive width computation: how many features to use
在文件PyramidChi2.h第141行定义。
vector of weights for each pyramid cell
在文件PyramidChi2.h第134行定义。
width
在文件PyramidChi2.h第139行定义。
int32_t width_computation_type [protected] |
width_computation_type
在文件PyramidChi2.h第137行定义。