RapidLib  v0.1.2
A simple library for interactive machine learning
modelSet Class Reference

#include <modelSet.h>

Inheritance diagram for modelSet:
Inheritance graph
Collaboration diagram for modelSet:
Collaboration graph

Public Member Functions

 modelSet ()
 
virtual ~modelSet ()
 
virtual bool train (const std::vector< trainingExample > &trainingSet)
 
bool initialize ()
 
std::vector< double > process (const std::vector< double > &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 * > myModelSet
 
int numInputs
 
std::vector< std::string > inputNames
 
int numOutputs
 
bool created
 

Detailed Description

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

Constructor & Destructor Documentation

§ modelSet()

modelSet::modelSet ( )

No arguments, don't create any models yet

§ ~modelSet()

modelSet::~modelSet ( )
virtual

Member Function Documentation

§ getJSON()

std::string modelSet::getJSON ( )

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

§ initialize()

bool modelSet::initialize ( )

reset to pre-training state

§ process()

std::vector< double > modelSet::process ( const std::vector< double > &  inputVector)

run regression or classification for each model

§ putJSON()

bool modelSet::putJSON ( const std::string &  jsonMessage)

configure empty model with string. See getJSON()

§ readJSON()

bool modelSet::readJSON ( const std::string &  filepath)

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

§ train()

bool modelSet::train ( const std::vector< trainingExample > &  trainingSet)
virtual

Train on a specified set, causes creation if not created

Reimplemented in classification, and regression.

§ writeJSON()

void modelSet::writeJSON ( const std::string &  filepath)

Write a JSON model description to specified file path

Member Data Documentation

§ created

bool modelSet::created
protected

§ inputNames

std::vector<std::string> modelSet::inputNames
protected

§ myModelSet

std::vector<baseModel*> modelSet::myModelSet
protected

§ numInputs

int modelSet::numInputs
protected

§ numOutputs

int modelSet::numOutputs
protected

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