Naive Bayes classifier.  
 More...
#include <NaiveBayes.hpp>
|  | 
|  | NaiveBayes (const string &csvPath, bool verbose=true) | 
|  | Naive Bayes classifier.  More... 
 | 
|  | 
| vector< string > | predict (vector< vector< string >> data, bool verbose=true) | 
|  | Predict the classes of new data.  More... 
 | 
|  | 
Naive Bayes classifier. 
Definition at line 19 of file NaiveBayes.hpp.
◆ NaiveBayes()
  
  | 
        
          | NaiveBayes::NaiveBayes | ( | const string & | csvPath, |  
          |  |  | bool | verbose = true |  
          |  | ) |  |  |  | inlineexplicit | 
 
Naive Bayes classifier. 
- Parameters
- 
  
    | csvPath | path to a CSV file containing the data. The first row in the file must contain the names of the features |  | verbose | whether to output the generated lookup tables |  
 
Definition at line 31 of file NaiveBayes.hpp.
 
 
◆ predict()
  
  | 
        
          | vector<string> NaiveBayes::predict | ( | vector< vector< string >> | data, |  
          |  |  | bool | verbose = true |  
          |  | ) |  |  |  | inline | 
 
Predict the classes of new data. 
- Parameters
- 
  
    | data | a vector of vectors of strings, each vector representing an element to be classified |  | verbose | whether to output the class assignment probabilities for each element |  
 
- Returns
- a vector containing the classes of the elements in data
- See also
- CSVReader, a class that helps in the creation of vectors of vectors of strings from CSV files 
Definition at line 90 of file NaiveBayes.hpp.
 
 
◆ lookupColumns
  
  | 
        
          | vector<string> NaiveBayes::lookupColumns |  | private | 
 
 
◆ lookupRows
  
  | 
        
          | vector<string> NaiveBayes::lookupRows |  | private | 
 
 
◆ lookupTable
  
  | 
        
          | MatrixI NaiveBayes::lookupTable |  | private | 
 
 
◆ yFrequency
  
  | 
        
          | MatrixI NaiveBayes::yFrequency |  | private | 
 
 
The documentation for this class was generated from the following file: