#include <classification.h>


Public Types | |
| enum | classificationTypes { knn, svm } |
Public Member Functions | |
| classificationTemplate () | |
| classificationTemplate (classificationTypes classificationType) | |
| classificationTemplate (const std::vector< trainingExampleTemplate< T > > &trainingSet) | |
| classificationTemplate (const int &numInputs, const int &numOutputs) | |
| ~classificationTemplate () | |
| bool | train (const std::vector< trainingExampleTemplate< T > > &trainingSet) |
| std::vector< int > | getK () |
| void | setK (const int whichModel, const int newK) |
Public Member Functions inherited from modelSet< T > | |
| modelSet () | |
| virtual | ~modelSet () |
| bool | reset () |
| std::vector< T > | run (const std::vector< T > &inputVector) |
| std::string | getJSON () |
| void | writeJSON (const std::string &filepath) |
| bool | putJSON (const std::string &jsonMessage) |
| bool | readJSON (const std::string &filepath) |
Additional Inherited Members | |
Protected Attributes inherited from modelSet< T > | |
| std::vector< baseModel< T > * > | myModelSet |
| int | numInputs |
| std::vector< std::string > | inputNames |
| int | numOutputs |
| bool | created |
Class for implementing a set of classification models.
This doesn't do anything modelSet can't do. But, it's simpler and more like wekinator.
| enum classificationTemplate::classificationTypes |
| classificationTemplate< T >::classificationTemplate | ( | ) |
with no arguments, just make an empty vector
| classificationTemplate< T >::classificationTemplate | ( | classificationTypes | classificationType | ) |
speciify classification type
| classificationTemplate< T >::classificationTemplate | ( | const std::vector< trainingExampleTemplate< T > > & | trainingSet | ) |
create based on training set inputs and outputs
| classificationTemplate< T >::classificationTemplate | ( | const int & | numInputs, |
| const int & | numOutputs | ||
| ) |
create with proper models, but not trained
|
inline |
destructor
| std::vector< int > classificationTemplate< T >::getK | ( | ) |
Check the K values for each model. This feature is temporary, and will be replaced by a different design.
| void classificationTemplate< T >::setK | ( | const int | whichModel, |
| const int | newK | ||
| ) |
Get the K values for each model. This feature is temporary, and will be replaced by a different design.
|
virtual |
Train on a specified set, causes creation if not created
Reimplemented from modelSet< T >.