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 * Written (W) 2012 Fernando José Iglesias García 00008 * Copyright (C) 2012 Fernando José Iglesias García 00009 */ 00010 00011 #ifndef _STRUCTURED_OUTPUT_MACHINE__H__ 00012 #define _STRUCTURED_OUTPUT_MACHINE__H__ 00013 00014 #include <shogun/labels/StructuredLabels.h> 00015 #include <shogun/lib/StructuredData.h> 00016 #include <shogun/machine/Machine.h> 00017 #include <shogun/loss/LossFunction.h> 00018 #include <shogun/structure/StructuredModel.h> 00019 00020 namespace shogun 00021 { 00022 class CStructuredModel; 00023 class CLossFunction; 00024 00026 class CStructuredOutputMachine : public CMachine 00027 { 00028 public: 00030 MACHINE_PROBLEM_TYPE(PT_STRUCTURED); 00031 00033 CStructuredOutputMachine(); 00034 00041 CStructuredOutputMachine(CStructuredModel* model, CLossFunction* loss, CStructuredLabels* labs); 00042 00044 virtual ~CStructuredOutputMachine(); 00045 00050 void set_model(CStructuredModel* model); 00051 00056 void set_loss(CLossFunction* loss); 00057 00059 virtual const char* get_name() const 00060 { 00061 return "StructuredOutputMachine"; 00062 } 00063 00064 private: 00066 void register_parameters(); 00067 00068 protected: 00070 CStructuredModel* m_model; 00071 00073 CLossFunction* m_loss; 00074 00075 00076 }; /* class CStructuredOutputMachine */ 00077 00078 } /* namespace shogun */ 00079 00080 #endif /* _STRUCTURED_OUTPUT_MACHINE__H__ */