SHOGUN
v2.0.0
|
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 DIRECTOR_STRUCTURED_MODEL_H_ 00011 #define DIRECTOR_STRUCTURED_MODEL_H_ 00012 00013 #include <shogun/structure/StructuredModel.h> 00014 #include <shogun/lib/config.h> 00015 #ifdef USE_SWIG_DIRECTORS 00016 namespace shogun 00017 { 00018 00019 class CStructuredModel; 00020 00021 #define IGNORE_IN_CLASSLIST 00022 00029 IGNORE_IN_CLASSLIST class CDirectorStructuredModel : public CStructuredModel 00030 { 00031 public: 00033 CDirectorStructuredModel(); 00034 00036 virtual ~CDirectorStructuredModel(); 00037 00042 virtual int32_t get_dim() const; 00043 00056 SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, int32_t lab_idx); 00057 00070 virtual SGVector< float64_t > get_joint_feature_vector(int32_t feat_idx, CStructuredData* y); 00071 00085 virtual CResultSet* argmax(SGVector< float64_t > w, int32_t feat_idx, bool const training = true); 00086 00094 float64_t delta_loss(int32_t ytrue_idx, CStructuredData* ypred); 00095 00103 virtual float64_t delta_loss(CStructuredData* y1, CStructuredData* y2); 00104 00105 using CStructuredModel::risk; 00106 00108 virtual const char* get_name() const { return "DirectorStructuredModel"; } 00109 00110 }; /* class CDirectorStructuredModel */ 00111 } /* namespace shogun */ 00112 #endif /* USE_SWIG_DIRECTORS */ 00113 #endif /* DIRECTOR_STRUCTURED_MODEL_H_ */