#include <modelSet.h>
Public Member Functions | |
modelSet () | |
virtual | ~modelSet () |
virtual bool | train (const std::vector< trainingExampleTemplate< T > > &trainingSet) |
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) |
Protected Member Functions | |
void | threadTrain (std::size_t i, const std::vector< trainingExampleTemplate< T > > &training_set) |
Protected Attributes | |
std::vector< baseModel< T > * > | myModelSet |
int | numInputs |
std::vector< std::string > | inputNames |
int | numOutputs |
bool | isTraining |
bool | isTrained |
This class holds a set of models with the same or different algorithms.
std::string modelSet< T >::getJSON |
Get a JSON representation of the model
bool modelSet< T >::putJSON | ( | const std::string & | jsonMessage | ) |
configure empty model with string. See getJSON()
bool modelSet< T >::readJSON | ( | const std::string & | filepath | ) |
read a JSON file at file path and build a modelSet from it
bool modelSet< T >::reset |
reset to pre-training state
std::vector< T > modelSet< T >::run | ( | const std::vector< T > & | inputVector | ) |
Generate an output value from a single input vector.
Will return an error if training in progress.
vector | A standard vector of type T that is the input for classification or regression. |
|
protected |
|
virtual |
Train on a specified set, causes creation if not created
Reimplemented in regressionTemplate< T >, and classificationTemplate< T >.
void modelSet< T >::writeJSON | ( | const std::string & | filepath | ) |
Write a JSON model description to specified file path
file | path |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |