CEBL  2.1
ClassifiersConfig.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 CLASSIFIERSCONFIG_H
26 #define CLASSIFIERSCONFIG_H
27 
28 #include "PluginLoader.hpp"
29 #include "Classifier.hpp"
30 #include "SessionManager.hpp"
31 using namespace CEBL;
32 
33 //std includes
34 #include <vector>
35 using namespace std;
36 
37 //forward declarations
38 class CEBLModel;
39 
41 {
42 private:
43  //make session manager a friend
44  friend class SessionManager;
45 
46  CEBLModel *model;
47 
48  //classifiers plugins
49  PluginLoader<Classifier> * plugin_loader;
50  PluginLoader<Classifier> * getPluginLoader() { return plugin_loader; }
51 
52  //selected classifier
53  string selected_classifier;
54 
55  //training
56  bool is_training;
57  string currently_training_classifier;
58 
59 public:
62 
63  //GETTING OPERATIONS
64  std::vector<string> getNameList();
65  std::vector<string> getPathList();
66  bool isTrained(string classifier = "");
67  string getSelected();
68  std::map<std::string, CEBL::Param> getParams(string classifier = "");
69  bool getUseProbs();
70  std::vector<std::vector<double> > getLastProbs();
71  int getTrainedClasses();
72  int getTrainedLags();
73 
74  //SETTING OPERATIONS
75  void reset(CEBL::Param, string classifier="");
76  void setSelected(string classifier);
77  void train(EEGTrainingData &training_data, string classifier = "");
78  void haltTrain();
79  void setParams(std::map<std::string, CEBL::Param> params, string classifier);
80  void setUseProbs(bool flag);
81 
82  //USE CLASSIFIER
83  ublas::vector<int> use(EEGData &data);
84 
85 };
86 
87 #endif
88