thaler-lab / EnergyFlow

Python package for the EnergyFlow suite of tools.

Home Page:https://energyflow.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Feeding data directly into F

tprocter46 opened this issue · comments

We (Andy Buckley and myself) have been working on using PFN's on large pp event level data (~300 particles per event). After conversations with Jesse Thaler and Ben Nachman, it was suggested that it might be useful to submit some data (e.g. the event's HT) directly into F, alongside the data obtained from the particles through Phi. This is currently not supported, but apparently would be relatively easy to implement.

Yes, this is relatively straightforward to implement. I will see if I can do it quickly.

Ok, version 1.2.0 is out and has this functionality. See num_global_features in the list of possible EFN/PFN arguments. Let me know if you have any questions/comments.

Great! Thanks a lot for doing this so quickly.
I'm afraid I'm still a little confused as to how I actually feed in the extra data when calling fit(). If I have "X_train, Y_train, Global_Feature_Train" (all of which are for N events), is the idea that I somehow concatenate Global_Feature_Train into X_train? , or do I have to supply this separately somehow? (I guess the same goes for validation_data = " ... "). Sorry if I've misunderstood something obvious.

Take a look at the tests for global_features to see how to pass in the features. Pretty much X_train gets promoted to a list/tuple which should be (X_train, global_features) and the same for validation_data and anything else you evaluate the model on. This is the same mechanism that is used with the EFNs to pass in the energies separately from the positions. Let me know if anything is still unclear.