SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
StochasticSOSVM.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  * Written (W) 2013 Shell Hu
00008  * Copyright (C) 2013 Shell Hu
00009  */
00010 
00011 #ifndef __STOCHASTIC_SOSVM_H__
00012 #define __STOCHASTIC_SOSVM_H__
00013 
00014 #include <shogun/lib/SGVector.h>
00015 #include <shogun/machine/LinearStructuredOutputMachine.h>
00016 
00017 namespace shogun
00018 {
00019 
00031 class CStochasticSOSVM : public CLinearStructuredOutputMachine
00032 {
00033 public:
00035     CStochasticSOSVM();
00036 
00044     CStochasticSOSVM(CStructuredModel* model, CStructuredLabels* labs,
00045         bool do_weighted_averaging = true, bool verbose = false);
00046 
00048     ~CStochasticSOSVM();
00049 
00051     virtual const char* get_name() const { return "StochasticSOSVM"; }
00052 
00057     virtual EMachineType get_classifier_type();
00058 
00060     float64_t get_lambda() const;
00061 
00066     void set_lambda(float64_t lbda);
00067 
00069     int32_t get_num_iter() const;
00070 
00075     void set_num_iter(int32_t num_iter);
00076 
00078     int32_t get_debug_multiplier() const;
00079 
00084     void set_debug_multiplier(int32_t multiplier);
00085 
00087     uint32_t get_rand_seed() const;
00088 
00093     void set_rand_seed(uint32_t rand_seed);
00094 
00095 protected:
00101     virtual bool train_machine(CFeatures* data = NULL);
00102 
00103 private:
00105     void init();
00106 
00107 private:
00109     float64_t m_lambda;
00110 
00112     int32_t m_num_iter;
00113 
00115     bool m_do_weighted_averaging;
00116 
00118     uint32_t m_rand_seed;
00119 
00126     int32_t m_debug_multiplier;
00127 
00128 }; /* CStochasticSOSVM */
00129 
00130 } /* namespace shogun */
00131 
00132 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation