MultitaskClusteredLogisticRegression.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Copyright (C) 2012 Sergey Lisitsyn
00008  */
00009 
00010 #ifndef  MULTITASKCLUSTEREDLOGISTICREGRESSION_H_
00011 #define  MULTITASKCLUSTEREDLOGISTICREGRESSION_H_
00012 
00013 #include <shogun/transfer/multitask/MultitaskLogisticRegression.h>
00014 
00015 namespace shogun
00016 {
00023 class CMultitaskClusteredLogisticRegression : public CMultitaskLogisticRegression
00024 {
00025 
00026     public:
00027         MACHINE_PROBLEM_TYPE(PT_BINARY)
00028 
00029         
00030         CMultitaskClusteredLogisticRegression();
00031 
00041         CMultitaskClusteredLogisticRegression(
00042              float64_t rho1, float64_t rho2, CDotFeatures* training_data, 
00043              CBinaryLabels* training_labels, CTaskGroup* task_group,
00044              int32_t num_clusters);
00045 
00047         virtual ~CMultitaskClusteredLogisticRegression();
00048 
00053         int32_t get_rho1() const; 
00054 
00058         void set_rho1(float64_t rho1); 
00059 
00062         int32_t get_rho2() const;
00063 
00067         void set_rho2(float64_t rho2);
00068 
00073         int32_t get_num_clusters() const;
00074 
00078         void set_num_clusters(int32_t num_clusters);
00079 
00084         virtual const char* get_name() const 
00085         {
00086             return "MultitaskClusteredLogisticRegression";
00087         }
00088 
00089     protected:
00090 
00095         virtual bool train_machine(CFeatures* data=NULL);
00096         
00101         virtual bool train_locked_implementation(SGVector<index_t>* tasks);
00102 
00103     protected:
00104 
00106         float64_t m_rho1;
00107         
00109         float64_t m_rho2;
00110 
00112         int32_t m_num_clusters;
00113 };
00114 }
00115 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation