RapidLib  v2.1.0
A simple library for interactive machine learning
modelSet< T > Class Template Reference

#include <modelSet.h>

Inheritance diagram for modelSet< T >:
Inheritance graph
Collaboration diagram for modelSet< T >:
Collaboration graph

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 Attributes

std::vector< baseModel< T > * > myModelSet
 
int numInputs
 
std::vector< std::string > inputNames
 
int numOutputs
 
bool created
 

Detailed Description

template<typename T>
class modelSet< T >

This class holds a set of models with the same or different algorithms.

Constructor & Destructor Documentation

§ modelSet()

template<typename T >
modelSet< T >::modelSet ( )

No arguments, don't create any models yet

§ ~modelSet()

template<typename T >
modelSet< T >::~modelSet ( )
virtual

Member Function Documentation

§ getJSON()

template<typename T >
std::string modelSet< T >::getJSON ( )

Get a JSON representation of the model in the form of a styled string

§ putJSON()

template<typename T >
bool modelSet< T >::putJSON ( const std::string &  jsonMessage)

configure empty model with string. See getJSON()

§ readJSON()

template<typename T >
bool modelSet< T >::readJSON ( const std::string &  filepath)

read a JSON file at file path and build a modelSet from it

§ reset()

template<typename T >
bool modelSet< T >::reset ( )

reset to pre-training state

§ run()

template<typename T >
std::vector< T > modelSet< T >::run ( const std::vector< T > &  inputVector)

run regression or classification for each model

§ train()

template<typename T >
bool modelSet< T >::train ( const std::vector< trainingExampleTemplate< T > > &  trainingSet)
virtual

Train on a specified set, causes creation if not created

Reimplemented in classificationTemplate< T >, and regressionTemplate< T >.

§ writeJSON()

template<typename T >
void modelSet< T >::writeJSON ( const std::string &  filepath)

Write a JSON model description to specified file path

Member Data Documentation

§ created

template<typename T >
bool modelSet< T >::created
protected

§ inputNames

template<typename T >
std::vector<std::string> modelSet< T >::inputNames
protected

§ myModelSet

template<typename T >
std::vector<baseModel<T>*> modelSet< T >::myModelSet
protected

§ numInputs

template<typename T >
int modelSet< T >::numInputs
protected

§ numOutputs

template<typename T >
int modelSet< T >::numOutputs
protected

The documentation for this class was generated from the following files: