Skip to content
Snippets Groups Projects
Commit 63caa096 authored by Chao Peng's avatar Chao Peng
Browse files

Fix some typos for imaging ML benchmark

parent e04d6dfb
Branches
No related tags found
1 merge request!286Improve imcal ml benchmarks
...@@ -7,7 +7,7 @@ ml_shower:epi_separation: ...@@ -7,7 +7,7 @@ ml_shower:epi_separation:
- | - |
if [[ ${DETECTOR} =~ athena if [[ ${DETECTOR} =~ athena
|| ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then || ${DETECTOR} =~ ecce && ${DETECTOR_CONFIG} =~ imaging ]] ; then
pip3 install -r rbenchmarks/imaging_shower_ML/equirements.txt pip3 install -r benchmarks/imaging_shower_ML/requirements.txt
python3 benchmarks/imaging_shower_ML/run_benchmark.py -t imcal_epi -n 1000 --pmin 1.8 --pmax 2.2 --nocut-samples python3 benchmarks/imaging_shower_ML/run_benchmark.py -t imcal_epi -n 1000 --pmin 1.8 --pmax 2.2 --nocut-samples
fi fi
""" """
A script to scan the optimized cut on layer and E/p. A script to scan the optimized cut on layer and E/p.
It scan all the possible ScFi layers (20 in the EPIC brycecanyon configuration) It groups [event, layer] and scan the E/p cut layer-wise (e.g., EPIC brycecanyon configuration has 16 ScFi layers)
The results give the best cut (highest pion rejection) on [layer, E/p] with a targeted electron efficiency The best 2D cut (highest rejection power) on [layer, E/p] that satisfies required effiiency will be given
Chao Peng (ANL) Chao Peng (ANL)
2022/11/13 2022/11/13
......
...@@ -131,7 +131,7 @@ if __name__ == '__main__': ...@@ -131,7 +131,7 @@ if __name__ == '__main__':
if args.seed > 0: if args.seed > 0:
np.random.seed(args.seed) np.random.seed(args.seed)
tf.random.seed(args.seed) tf.random.set_seed(args.seed)
df = pd.read_hdf(args.data_store, key=imcal_info.ml_data_key) df = pd.read_hdf(args.data_store, key=imcal_info.ml_data_key)
# NOTE: assumed event index is exactly the same as df # NOTE: assumed event index is exactly the same as df
...@@ -274,7 +274,8 @@ if __name__ == '__main__': ...@@ -274,7 +274,8 @@ if __name__ == '__main__':
), ),
test=OrderedDict( test=OrderedDict(
sample_size=count_pid_labels(ytest, pids), sample_size=count_pid_labels(ytest, pids),
efficiencies=OrderedDict([(labels.name, eff) for labels, eff in effs]) efficiencies=OrderedDict([(labels.name, eff) for labels, eff in effs]),
rejections=OrderedDict([(labels.name, 1./eff) for labels, eff in effs]),
), ),
) )
res_json = json.dumps(result, indent=4, cls=NpEncoder) res_json = json.dumps(result, indent=4, cls=NpEncoder)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment