20 initialize_parameters();
21 register_parameters();
29 initialize_parameters();
30 register_parameters();
38 void CMultitaskLogisticRegression::register_parameters()
48 void CMultitaskLogisticRegression::initialize_parameters()
67 for (int32_t i=0; i<y.vlen; i++)
70 slep_options options = slep_options::default_options();
80 switch (relation_type)
85 options.mode = MULTITASK_GROUP;
86 options.loss = LOGISTIC;
96 options.ind_t = ind_t.
vector;
97 options.n_nodes = ind_t.
vlen / 3;
98 options.mode = MULTITASK_TREE;
99 options.loss = LOGISTIC;
106 SG_ERROR(
"Not supported task relation type\n")
108 SG_FREE(options.tasks_indices);
119 for (int32_t i=0; i<y.vlen; i++)
122 slep_options options = slep_options::default_options();
124 options.tasks_indices = tasks;
132 switch (relation_type)
137 options.mode = MULTITASK_GROUP;
138 options.loss = LOGISTIC;
148 options.ind_t = ind_t.
vector;
149 options.n_nodes = ind_t.
vlen / 3;
150 options.mode = MULTITASK_TREE;
151 options.loss = LOGISTIC;
158 SG_ERROR(
"Not supported task relation type\n")
203 ASSERT(regularization==0 || regularization==1)
208 ASSERT(termination>=0 && termination<=4)
void set_max_iter(int32_t max_iter)
int32_t get_termination() const
virtual bool train_locked_implementation(SGVector< index_t > *tasks)
The class Labels models labels, i.e. class assignments of objects.
virtual float64_t dense_dot(int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)=0
virtual int32_t get_num_labels() const =0
CMultitaskLogisticRegression()
Features that support dot products among other operations.
void set_regularization(int32_t regularization)
int32_t get_regularization() const
virtual bool train_machine(CFeatures *data=NULL)
SGVector< float64_t > get_SLEP_ind_t()
virtual ETaskRelationType get_relation_type() const =0
virtual ~CMultitaskLogisticRegression()
void set_termination(int32_t termination)
CTaskRelation * m_task_relation
float64_t get_tolerance() const
virtual void set_features(CDotFeatures *feat)
virtual int32_t get_num_tasks() const =0
slep_result_t slep_solver(CDotFeatures *features, double *y, double z, const slep_options &options)
class MultitaskLinearMachine, a base class for linear multitask classifiers
SGMatrix< float64_t > m_tasks_w
all of classes and functions are contained in the shogun namespace
void set_tolerance(float64_t tolerance)
The class Features is the base class of all feature objects.
class TaskTree used to represent a tree of tasks. Tree is constructed via task with subtasks (and sub...
Binary Labels for binary classification.
SGVector< float64_t > m_tasks_c
used to represent tasks in multitask learning
int32_t get_max_iter() const
virtual float64_t apply_one(int32_t i)
T * get_column_vector(index_t col) const
virtual SGVector< index_t > * get_tasks_indices() const =0