CEBL  2.1
QDA.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 
18 #ifndef QDA_H
19 #define QDA_H
20 
21 #include "../model/Classifier.hpp"
22 
23 namespace CEBL
24 {
25  class QDA : public Classifier
26  {
27  private:
28  ublas::vector<double> priors;
29  ublas::matrix<double> means;
30  std::vector<ublas::matrix<double> > covariances;
31  std::vector<ublas::matrix<double> > covariancesInv;
32  ublas::vector<double> covariancesDet;
33  ublas::vector<int> classes;
34 
35  public:
36  QDA() { plugin_name = "QDA"; }
37 
39  void train(const EEGTrainingData &);
40 
42  ublas::vector<int> use(const ublas::matrix<double> &);
43 
45  std::map<std::string, CEBL::Param> getParamsList();
46  void setParamsList( std::map<std::string, CEBL::Param> &);
47 
48  //saving and loading
49  map<string, SerializedObject> save() const;
50  void load(map<string, SerializedObject> objects);
51 
52 
53  };
54 }
55 #endif