SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OnlineLibLinear.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2007-2010 Soeren Sonnenburg
8  * Written (W) 2011 Shashwat Lal Das
9  * Copyright (c) 2007-2009 The LIBLINEAR Project.
10  * Copyright (C) 2007-2010 Fraunhofer Institute FIRST and Max-Planck-Society
11  */
12 
13 #ifndef _ONLINELIBLINEAR_H__
14 #define _ONLINELIBLINEAR_H__
15 
16 #include <shogun/lib/config.h>
17 
18 #include <shogun/lib/common.h>
19 #include <shogun/base/Parameter.h>
21 
22 namespace shogun
23 {
27 {
28 public:
31 
38 
46 
48  virtual ~COnlineLibLinear();
49 
58  virtual bool train(CFeatures* data=NULL);
59 
66  virtual void set_C(float64_t c_neg, float64_t c_pos) { C1=c_neg; C2=c_pos; }
67 
73  virtual float64_t get_C1() { return C1; }
74 
80  float64_t get_C2() { return C2; }
81 
87  virtual void set_bias_enabled(bool enable_bias) { use_bias=enable_bias; }
88 
94  virtual bool get_bias_enabled() { return use_bias; }
95 
97  inline virtual const char* get_name() const { return "OnlineLibLinear"; }
98 
99 private:
101  void init();
102 
103 private:
105  bool use_bias;
107  float64_t C1;
109  float64_t C2;
110 };
111 }
112 #endif // _ONLINELIBLINEAR_H__

SHOGUN Machine Learning Toolbox - Documentation