21 initialize_parameters();
22 register_parameters();
30 initialize_parameters();
31 register_parameters();
39 void CMultitaskLogisticRegression::register_parameters()
49 void CMultitaskLogisticRegression::initialize_parameters()
68 for (int32_t i=0; i<y.vlen; i++)
71 slep_options options = slep_options::default_options();
81 switch (relation_type)
86 options.mode = MULTITASK_GROUP;
87 options.loss = LOGISTIC;
97 options.ind_t = ind_t.
vector;
98 options.n_nodes = ind_t.
vlen / 3;
99 options.mode = MULTITASK_TREE;
100 options.loss = LOGISTIC;
107 SG_ERROR(
"Not supported task relation type\n")
109 SG_FREE(options.tasks_indices);
120 for (int32_t i=0; i<y.vlen; i++)
123 slep_options options = slep_options::default_options();
125 options.tasks_indices = tasks;
133 switch (relation_type)
138 options.mode = MULTITASK_GROUP;
139 options.loss = LOGISTIC;
149 options.ind_t = ind_t.
vector;
150 options.n_nodes = ind_t.
vlen / 3;
151 options.mode = MULTITASK_TREE;
152 options.loss = LOGISTIC;
159 SG_ERROR(
"Not supported task relation type\n")
204 ASSERT(regularization==0 || regularization==1)
209 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)
Vector::Scalar dot(Vector a, Vector b)
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)
T * get_column_vector(index_t col) const
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)
virtual SGVector< index_t > * get_tasks_indices() const =0