-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in building classifier model #17
Comments
Running a mini-test using 2 gamma runs for energy estimation & 2 gamma runs + 2 proton runs for classification, I managed to get to the end. I guess the energy model was produced without any problem. As far as I see there are three places in which something could go wrong:
I propose to go step-by-step into each of these. |
yess I had no problems and in the merging, both the files (gamma and proton) seem fine. All the columns have values, except for the ones labeled
Instead for the dl1_write I used:
Regarding the configuration file I only add my directory and I left the parameters you had. |
I found the problem: the value of the parameter |
Hi Alice, Can you confirm that this is fixed in your analysis by just modifying the model building configuration (namely, just the appropriate YAML file)? If this is true, this is not really a bug and we can just add an appropriate section in the docs to let people know. |
Hi, yes it's not a bug it's just the missing of an |
Perfetct! This helps to clear thing up. So (I add to the discussion also @vuillaut, which opened said PR) if I understand correctly:
|
FINAL UPDATE This is now solved by simtel for newer divergent simulations. |
Using the script
build_model.py
withclassifier.yaml
I get the following error:Traceback (most recent call last):
File "/storage/gpfs_data/ctalocal/adonini/protopipe/protopipe/scripts/build_model.py", line 248, in <module>
main()
File "/storage/gpfs_data/ctalocal/adonini/protopipe/protopipe/scripts/build_model.py", line 169, in main
force_same_nsig_nbkg=use_same_number_of_sig_and_bkg_for_training,
File "/storage/gpfs_data/ctalocal/adonini/protopipe/protopipe/mva/train_model.py", line 66, in split_data
target_name=self.target_name
File "/storage/gpfs_data/ctalocal/adonini/protopipe/protopipe/mva/utils.py", line 54, in split_train_test
run_max_train = obs_ids[max_train_obs_idx]
IndexError: index 0 is out of bounds for axis 0 with size 0
The files I use should be right:
filename_sig: DL1/for_classification/dl1_tail_gamma_merged.h5
filename_bkg: DL1/for_classification/dl1_tail_proton_merged.h5
and the data are loaded correctly in
data_sig
anddata_bkg
:But if I print them after the "add label", lines 149-150 in build_model.py, I get an empty data frame:
data_sig: Empty DataFrame
data_bkg: Empty DataFrame
The problem should be in the function
prepare_data
inutils.py
, but I cannot see it.The text was updated successfully, but these errors were encountered: