RapidLib  v2.2.0
A simple library for interactive machine learning
baseModel< T > Class Template Referenceabstract

#include <baseModel.h>

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

Public Member Functions

virtual ~baseModel ()
 
virtual T run (const std::vector< T > &inputVector)=0
 
virtual void train (const std::vector< trainingExampleTemplate< T > > &trainingSet)=0
 
virtual void train (const std::vector< trainingExampleTemplate< T > > &trainingSet, const std::size_t whichOutput)=0
 
virtual void reset ()=0
 
virtual size_t getNumInputs () const =0
 
virtual std::vector< size_t > getWhichInputs () const =0
 
virtual void getJSONDescription (Json::Value &currentModel)=0
 

Protected Member Functions

template<typename TT , class Dummy = int>
Json::Value vector2json (TT vec)
 
template<class Dummy = int>
Json::Value vector2json (std::vector< unsigned long > vec)
 

Detailed Description

template<typename T>
class baseModel< T >

Base class for wekinator models. Implemented by NN and KNN classes

Constructor & Destructor Documentation

◆ ~baseModel()

template<typename T >
virtual baseModel< T >::~baseModel ( )
inlinevirtual

Member Function Documentation

◆ getJSONDescription()

template<typename T >
virtual void baseModel< T >::getJSONDescription ( Json::Value &  currentModel)
pure virtual

◆ getNumInputs()

template<typename T >
virtual size_t baseModel< T >::getNumInputs ( ) const
pure virtual

◆ getWhichInputs()

template<typename T >
virtual std::vector<size_t> baseModel< T >::getWhichInputs ( ) const
pure virtual

◆ reset()

template<typename T >
virtual void baseModel< T >::reset ( )
pure virtual

◆ run()

template<typename T >
virtual T baseModel< T >::run ( const std::vector< T > &  inputVector)
pure virtual

◆ train() [1/2]

template<typename T >
virtual void baseModel< T >::train ( const std::vector< trainingExampleTemplate< T > > &  trainingSet)
pure virtual

◆ train() [2/2]

template<typename T >
virtual void baseModel< T >::train ( const std::vector< trainingExampleTemplate< T > > &  trainingSet,
const std::size_t  whichOutput 
)
pure virtual

◆ vector2json() [1/2]

template<typename T >
template<class Dummy = int>
Json::Value baseModel< T >::vector2json ( std::vector< unsigned long >  vec)
inlineprotected

◆ vector2json() [2/2]

template<typename T >
template<typename TT , class Dummy = int>
Json::Value baseModel< T >::vector2json ( TT  vec)
inlineprotected

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