 |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef CALOCLUSTERCORRECTION_CALOCLUSTERMLCALIBFEATURETRANSFORMS_H
6 #define CALOCLUSTERCORRECTION_CALOCLUSTERMLCALIBFEATURETRANSFORMS_H
20 throw std::invalid_argument(
"Standard expects 2 parameters [mean, std_dev]");
24 return (
x -
mean) / std_dev;
27 float log(
float x,
const std::vector<float> & )
34 float logTen(
float x,
const std::vector<float> & )
44 throw std::invalid_argument(
"LogStandard expects 2 parameters [mean, std_dev]");
45 float log_x =
log(
x, {});
52 throw std::invalid_argument(
"LogTenStandard expects 4 parameters [xmin, epsilon, mean, std_dev]");
55 float log_x =
logTen(x_shifted, {});
62 throw std::invalid_argument(
"MaxAbsolute expects 1 parameter [max_value]");
66 return x / std::abs(max_val);
72 throw std::invalid_argument(
"MinMaxNorm expects 2 parameters [min_val, max_val]");
74 if (min_val == max_val)
76 return (
x - min_val) / (max_val - min_val);
91 #endif // CALOCLUSTERCORRECTION_CALOCLUSTERMLCALIBFEATURETRANSFORMS_H
float maxAbsolute(float x, const std::vector< float > ¶ms)
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
std::function< float(float, const std::vector< float > &)> TransformFunc
float logTen(float x, const std::vector< float > &)
float logStandard(float x, const std::vector< float > ¶ms)
float standard(float x, const std::vector< float > ¶ms)
float logTenStandard(float x, const std::vector< float > ¶ms)
const std::map< std::string, TransformFunc > TRANSFORMATIONS
float log(float x, const std::vector< float > &)
float minMax(float x, const std::vector< float > ¶ms)