CEBL  2.1
MSPRT.hpp
Go to the documentation of this file.
1 /*
2 * CEBL : CSU EEG Brain-Computer Interface Lab
3 *
4 * Author: Jeshua Bratman - jeshuabratman@gmail.com
5 *
6 * This file is part of CEBL.
7 *
8 * CEBL is free software; you can redistribute it and/or modify it.
9 * We only ask that if you use our code that you cite the source in
10 * your project or publication.
11 *
12 * EEG Group (www.cs.colostate.edu/eeg)
13 * Department of Computer Science
14 * Colorado State University
15 *
16 */
17 
25 #ifndef MSPRT_H
26 #define MSPRT_H
27 
28 #include "../model/Decision.hpp"
29 
30 namespace CEBL
31 {
32  class MSPRT : public Decision
33  {
34  private:
35  ublas::vector<double> sums;
36  ublas::vector<double> log_probs;
37  double log_threshold;
38  double threshold;
39  double g;
40 
41 
42  public:
43  MSPRT();
44  ~MSPRT();
45 
46  void updateWithProbabilities(std::vector<double> probs);
47  std::vector<double> decideClasses();
48  void init(int num_classes);
49 
50  //params
51  std::map<std::string, CEBL::Param> getParamsList();
52  void setParamsList( std::map<std::string, CEBL::Param>&);
53 
54  //saving and loading
55  map<string, SerializedObject> save() const;
56  void load(map<string, SerializedObject> objects);
57 
58  };
59 }
60 
61 
62 #endif