Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RFunction_Mean.cxx
Go to the documentation of this file.
2
3
4namespace TMVA {
5namespace Experimental {
6namespace SOFIE {
7
9 std::string modelGenerationString;
10 modelGenerationString = "\n//--------- GNN_Aggregate_Function---"+fFuncName+"\n";
11 modelGenerationString += "std::vector<float> "+fFuncName+"(const int& num_features, const std::vector<std::vector<float>::iterator>& inputs){\n";
12 modelGenerationString += "\tstd::vector<float> result(num_features,0);\n";
13 modelGenerationString += "\tfor(auto &it:inputs){\n";
14 modelGenerationString += "\t\tstd::transform(result.begin(), result.end(), it, result.begin(), std::plus<float>());\n\t}\n";
15 modelGenerationString += "\tfor_each(result.begin(), result.end(), [&result](float &x){ x /= result.size();\n";
16 modelGenerationString += "\treturn result;\n}";
17 return modelGenerationString;
18}
19
20}
21}
22}
create variable transformations