公有成员 | 保护属性

CMultitaskKernelMaskNormalizer类参考


详细描述

The MultitaskKernel allows Multitask Learning via a modified kernel function.

The user defines a set of active tasks. Subsequently, only similarities between active tasks are taken into account. Kernel entries between tasks of which at least one is not an active tasks are set to zero.

\[ K_S(x,y)=\left\{\begin{array}{cl} K_B(x,y), & \mbox{if } t(x) \in S \wedge t(y) \in S\\ 0, & \mbox{else} \end{array}\right. \]

在文件MultitaskKernelMaskNormalizer.h32行定义。

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

所有成员的列表。

公有成员

 CMultitaskKernelMaskNormalizer ()
 CMultitaskKernelMaskNormalizer (std::vector< int32_t > task_lhs, std::vector< int32_t > task_rhs, std::vector< int32_t > active_tasks_vec)
virtual ~CMultitaskKernelMaskNormalizer ()
virtual bool init (CKernel *k)
virtual float64_t normalize (float64_t value, int32_t idx_lhs, int32_t idx_rhs)
virtual float64_t normalize_lhs (float64_t value, int32_t idx_lhs)
virtual float64_t normalize_rhs (float64_t value, int32_t idx_rhs)
std::vector< int32_t > get_task_vector_lhs () const
void set_task_vector_lhs (std::vector< int32_t > vec)
std::vector< int32_t > get_task_vector_rhs () const
void set_task_vector_rhs (std::vector< int32_t > vec)
void set_task_vector (std::vector< int32_t > vec)
float64_t get_similarity (int32_t task_lhs, int32_t task_rhs)
std::vector< int32_t > get_active_tasks ()
float64_t get_normalization_constant () const
float64_t set_normalization_constant (float64_t constant)
virtual const char * get_name () const

保护属性

std::set< int32_t > active_tasks
std::vector< int32_t > task_vector_lhs
std::vector< int32_t > task_vector_rhs
float64_t scale
float64_t normalization_constant

构造及析构函数文档

default constructor

在文件MultitaskKernelMaskNormalizer.h41行定义。

CMultitaskKernelMaskNormalizer ( std::vector< int32_t >  task_lhs,
std::vector< int32_t >  task_rhs,
std::vector< int32_t >  active_tasks_vec 
)

default constructor

参数:
task_lhs task vector with containing task_id for each example for left hand side
task_rhs task vector with containing task_id for each example for right hand side

在文件MultitaskKernelMaskNormalizer.h50行定义。

virtual ~CMultitaskKernelMaskNormalizer (  )  [virtual]

default destructor

在文件MultitaskKernelMaskNormalizer.h69行定义。


成员函数文档

std::vector<int32_t> get_active_tasks (  ) 
返回:
list of active task ids

在文件MultitaskKernelMaskNormalizer.h224行定义。

virtual const char* get_name (  )  const [virtual]
返回:
object name

实现了CSGObject

在文件MultitaskKernelMaskNormalizer.h255行定义。

float64_t get_normalization_constant (  )  const
返回:
normalization constant

在文件MultitaskKernelMaskNormalizer.h241行定义。

float64_t get_similarity ( int32_t  task_lhs,
int32_t  task_rhs 
)
参数:
task_lhs task_id on left hand side
task_rhs task_id on right hand side
返回:
similarity between tasks

在文件MultitaskKernelMaskNormalizer.h204行定义。

std::vector<int32_t> get_task_vector_lhs (  )  const
返回:
vec task vector with containing task_id for each example on left hand side

在文件MultitaskKernelMaskNormalizer.h151行定义。

std::vector<int32_t> get_task_vector_rhs (  )  const
返回:
vec task vector with containing task_id for each example on right hand side

在文件MultitaskKernelMaskNormalizer.h172行定义。

virtual bool init ( CKernel k  )  [virtual]

initialization of the normalizer

参数:
k kernel

实现了CKernelNormalizer

在文件MultitaskKernelMaskNormalizer.h75行定义。

virtual float64_t normalize ( float64_t  value,
int32_t  idx_lhs,
int32_t  idx_rhs 
) [virtual]

normalize the kernel value

参数:
value kernel value
idx_lhs index of left hand side vector
idx_rhs index of right hand side vector

实现了CKernelNormalizer

在文件MultitaskKernelMaskNormalizer.h112行定义。

virtual float64_t normalize_lhs ( float64_t  value,
int32_t  idx_lhs 
) [virtual]

normalize only the left hand side vector

参数:
value value of a component of the left hand side feature vector
idx_lhs index of left hand side vector

实现了CKernelNormalizer

在文件MultitaskKernelMaskNormalizer.h134行定义。

virtual float64_t normalize_rhs ( float64_t  value,
int32_t  idx_rhs 
) [virtual]

normalize only the right hand side vector

参数:
value value of a component of the right hand side feature vector
idx_rhs index of right hand side vector

实现了CKernelNormalizer

在文件MultitaskKernelMaskNormalizer.h144行定义。

float64_t set_normalization_constant ( float64_t  constant  ) 
参数:
constant normalization constant

在文件MultitaskKernelMaskNormalizer.h249行定义。

void set_task_vector ( std::vector< int32_t >  vec  ) 
参数:
vec task vector with containing task_id for each example

在文件MultitaskKernelMaskNormalizer.h192行定义。

void set_task_vector_lhs ( std::vector< int32_t >  vec  ) 
参数:
vec task vector with containing task_id for each example

在文件MultitaskKernelMaskNormalizer.h158行定义。

void set_task_vector_rhs ( std::vector< int32_t >  vec  ) 
参数:
vec task vector with containing task_id for each example

在文件MultitaskKernelMaskNormalizer.h179行定义。


成员数据文档

std::set<int32_t> active_tasks [protected]

list of active tasks

在文件MultitaskKernelMaskNormalizer.h265行定义。

outer normalization constant

在文件MultitaskKernelMaskNormalizer.h277行定义。

float64_t scale [protected]

value of first element

在文件MultitaskKernelMaskNormalizer.h274行定义。

std::vector<int32_t> task_vector_lhs [protected]

task vector indicating to which task each example on the left hand side belongs

在文件MultitaskKernelMaskNormalizer.h268行定义。

std::vector<int32_t> task_vector_rhs [protected]

task vector indicating to which task each example on the right hand side belongs

在文件MultitaskKernelMaskNormalizer.h271行定义。


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

SHOGUN Machine Learning Toolbox - Documentation