CEBL  2.1
MNF.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 FILTERMNF_H
26 #define FILTERMNF_H
27 
28 #include "model/Filter.hpp"
29 
30 namespace CEBL
31 {
32  class MNF : public Filter
33  {
34  private:
35  void mnf(const ublas::matrix<double> &);
36  ublas::matrix<double> psi;
37  ublas::matrix<double> phi;
38  ublas::matrix<double> filter;
39  ublas::vector<double> means;
40 
41 
42 
43 
44  public:
45  MNF() { plugin_name = "MNF"; }
46 
53  void make(const ublas::matrix<double> &data,
54  const std::vector<int> &components);
55 
63  ublas::matrix<double> apply(const ublas::matrix<double> & data) const;
64 
71  ublas::matrix<double> extract(const ublas::matrix<double> &data);
72 
77  ublas::matrix<double> getFilterMatrix() { return filter; }
78 
79  //saving and loading
80  map<string, SerializedObject> save() const;
81  void load(map<string, SerializedObject> objects);
82 
83  };
84 }
85 
86 
87 #endif