#ifndef NEURALNET_H #define NEURALNET_H #include #include #include #include #include class NeuralNet { public: void saveNut(); void init(Json::Value jsonResults); int getN(); float run(const std::map& input); void neuralNetEnabled(bool val); private: void createHeaders(); bool filesExist(); void trainAndSave(); void getScalingFactors(); void scaleData(); private: int current_index = 0; std::vector inputTrainData = {}; std::vector scaledInputTrainData = {}; std::vector outputTrainData = {}; std::vector scaledOutputTrainData = {}; std::vector result_names = {}; FANN::neural_net net; // tuple of min and scaling factor for each input std::vector> scaling_input_data = {}; bool use_neural_net = true; }; #endif // NEURALNET_H