Newer
Older
#ifndef LIB4NEURO_NORMALIZATIONSTRATEGYACSF_H
#define LIB4NEURO_NORMALIZATIONSTRATEGYACSF_H
#include <limits>
#include <vector>
#include <unordered_map>
#include <serialization/access.hpp>
#include "../SymmetryFunction/SymmetryFunction.h"
#include "../DataSet/DataSet.h"
namespace lib4neuro {
/**
*
*/
class NormalizationStrategyACSF: public NormalizationStrategy {
friend boost::serialization::access;
protected:
/**
* information about the real range of input values for each element
*/
std::unordered_map<ELEMENT_SYMBOL, std::vector<double> > inputs_min, inputs_max;
/**
* information about the range of the output
*/
double outputs_min;
double outputs_max;
/**
* information about the various elements
*/
std::unordered_map<ELEMENT_SYMBOL, unsigned int > number_of_inputs_per_element;
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
std::vector<ELEMENT_SYMBOL> order_of_elements;
NormalizationStrategyACSF() = default;
public:
/**
*
*/
struct access;
NormalizationStrategyACSF(
const std::unordered_map<ELEMENT_SYMBOL, Element*>& element_description,
const std::vector<ELEMENT_SYMBOL> &element_order,
const std::vector<std::pair<std::vector<double>, std::vector<double>>> &data
);
virtual ~NormalizationStrategyACSF( ) = default;
void normalize_input(std::vector<double> &inp);
void de_normalize_input(std::vector<double> &inp);
void normalize_output(std::vector<double> &out);
void de_normalize_output(std::vector<double> &out);
/**
*
* @param n
* @param max
* @param min
* @return
*/
virtual double normalize(double n,
double max,
double min){
return 0.0;
};
/**
*
* @param n
* @param max
* @param min
* @return
*/
virtual double de_normalize(double n){
return 0.0;
}
};