Classification problem on modified macros

Dear experts
I am trying to modify TMVAClassification.C to test the SVM classification
I made two different data files, one working by macros the other one is failed

I get the following error message

<FATAL> : <GetSeparation> signal and background histogram have different or invalid dimensions:
***> abort program execution
terminate called after throwing an instance of 'std::runtime_error'
what(): FATAL error

I can not find what the cause of the erorr is
Could you please help me with this?

I attached the data files and modified macros of classification
gaussian_data_1.root (426.3 KB)
gaussian_data_2.root (215.5 KB)
TMVAClassification.C (2.2 KB)

gaussian_data_1 is working
gaussian_data_2 does not work

Thank you a lot for your help in advance

best regards,
Nam

Hi,

In situations like this you have help of the TMVA error messages. In your case the line
<WARNING> : Variable "var1" has zero, negative, or NaN RMS^2: nan ==> set to zero. Please check the variable content
indicates that something fishy is happening with the as it arrives to TMVA.

Inspecting the second data file with the command rootbrowse we can see that the weight variable in the background tree is 0 for all events. This means all events you add will effectively be (0, 0, 0) which is probably not what you want :wink:

TLDR; Fix the data generation to weight background events correctly or remove line 52 in your script.

Cheers,
Kim

1 Like