MulticlassMultipleOutputLabels.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 MULTICLASSMULTIPLEOUTPUTLABELS_H_
00011 #define MULTICLASSMULTIPLEOUTPUTLABELS_H_
00012 
00013 #include <shogun/labels/Labels.h>
00014 #include <shogun/labels/LabelTypes.h>
00015 #include <shogun/lib/DynamicObjectArray.h>
00016 
00017 namespace shogun 
00018 {
00026 class CMulticlassMultipleOutputLabels : public CLabels
00027 {
00028 
00029     public:
00031         CMulticlassMultipleOutputLabels();
00032 
00037         CMulticlassMultipleOutputLabels(int32_t num_labels);
00038 
00040         virtual ~CMulticlassMultipleOutputLabels();
00041 
00046         static CMulticlassMultipleOutputLabels* obtain_from_generic(CLabels* base_labels);
00047 
00054         virtual void ensure_valid(const char* context = NULL);
00055 
00062         SGMatrix<index_t> get_labels() const;
00063         
00070         SGVector<index_t> get_label(int32_t idx);
00071 
00082         bool set_label(int32_t idx, SGVector<index_t> label);
00083 
00088         virtual int32_t get_num_labels();
00089 
00091         virtual const char* get_name() const { return "MulticlassMultipleOutputLabels"; }
00092 
00097         virtual ELabelType get_label_type() { return LT_MULTICLASS_MULTIPLE_OUTPUT; }
00098 
00099     private:
00101         void init();
00102 
00103     protected:
00105         SGVector<index_t>* m_labels;
00107         int32_t m_n_labels;
00108 
00109 };
00110 }
00111 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation