17 #include "../dependencies/json/json.h"
25 std::string to_string(T Value)
27 std::ostringstream TempStream;
29 return TempStream.str();
32 inline long double strtold(
const char* str,
char** str_end)
34 return strtod(str, str_end);
45 virtual T
run(
const std::vector<T>& inputVector) = 0;
57 template<
typename TT,
class Dummy=
int>
61 for (
auto value : vec)
63 toReturn.append( (Json::Value)value );
69 template<
class Dummy=
int>
73 for (
auto value : vec)
75 toReturn.append( (
double)value );
Definition: baseModel.h:42
virtual std::vector< size_t > getWhichInputs() const =0
virtual T run(const std::vector< T > &inputVector)=0
virtual void getJSONDescription(Json::Value ¤tModel)=0
virtual size_t getNumInputs() const =0
virtual void train(const std::vector< trainingExampleTemplate< T > > &trainingSet, const std::size_t whichOutput)=0
Json::Value vector2json(TT vec)
Definition: baseModel.h:58
virtual ~baseModel()
Definition: baseModel.h:44
Json::Value vector2json(std::vector< unsigned long > vec)
Definition: baseModel.h:70
virtual void train(const std::vector< trainingExampleTemplate< T > > &trainingSet)=0
Definition: trainingExample.h:19