SHOGUN v0.9.0
|
The MultitaskKernel allows Multitask Learning via a modified kernel function based on taxonomy.
公有成员 | |
CMultitaskKernelTreeNormalizer () | |
CMultitaskKernelTreeNormalizer (std::vector< std::string > task_lhs, std::vector< std::string > task_rhs, CTaxonomy tax) | |
virtual | ~CMultitaskKernelTreeNormalizer () |
void | update_cache () |
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) |
void | set_task_vector_lhs (std::vector< std::string > vec) |
void | set_task_vector_rhs (std::vector< std::string > vec) |
void | set_task_vector (std::vector< std::string > vec) |
int32_t | get_num_betas () |
float64_t | get_beta (int32_t idx) |
void | set_beta (int32_t idx, float64_t weight) |
float64_t | get_node_similarity (int32_t node_lhs, int32_t node_rhs) |
void | set_node_similarity (int32_t node_lhs, int32_t node_rhs, float64_t similarity) |
virtual const char * | get_name () const |
保护属性 | |
CTaxonomy | taxonomy |
int32_t | num_nodes |
std::vector< int32_t > | task_vector_lhs |
std::vector< int32_t > | task_vector_rhs |
std::vector< float64_t > | dependency_matrix |
default constructor
CMultitaskKernelTreeNormalizer | ( | std::vector< std::string > | task_lhs, |
std::vector< std::string > | task_rhs, | ||
CTaxonomy | tax | ||
) |
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 |
tax | taxonomy |
virtual ~CMultitaskKernelTreeNormalizer | ( | ) | [virtual] |
default destructor
float64_t get_beta | ( | int32_t | idx | ) | [virtual] |
virtual const char* get_name | ( | void | ) | const [virtual] |
float64_t get_node_similarity | ( | int32_t | node_lhs, |
int32_t | node_rhs | ||
) |
node_lhs | node_id on left hand side |
node_rhs | node_id on right hand side |
int32_t get_num_betas | ( | ) | [virtual] |
normalize the kernel value
value | kernel value |
idx_lhs | index of left hand side vector |
idx_rhs | index of right hand side vector |
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 |
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 |
void set_beta | ( | int32_t | idx, |
float64_t | weight | ||
) | [virtual] |
idx | id of weight |
weight | weight of node with given id |
void set_node_similarity | ( | int32_t | node_lhs, |
int32_t | node_rhs, | ||
float64_t | similarity | ||
) |
node_lhs | node_id on left hand side |
node_rhs | node_id on right hand side |
similarity | similarity between nodes |
void set_task_vector | ( | std::vector< std::string > | vec | ) |
vec | task vector with containing task_id for each example |
void set_task_vector_lhs | ( | std::vector< std::string > | vec | ) |
vec | task vector with containing task_id for each example |
void set_task_vector_rhs | ( | std::vector< std::string > | vec | ) |
vec | task vector with containing task_id for each example |
void update_cache | ( | ) |
update cache
std::vector<float64_t> dependency_matrix [protected] |
MxM matrix encoding similarity between tasks
int32_t num_nodes [protected] |
number of tasks
std::vector<int32_t> task_vector_lhs [protected] |
task vector indicating to which task each example on the left hand side belongs
std::vector<int32_t> task_vector_rhs [protected] |
task vector indicating to which task each example on the right hand side belongs
taxonomy