Skip to content

Commit

Permalink
Merge pull request #120 from HealthyPear/fix-classifier_integration_test
Browse files Browse the repository at this point in the history
Fix classifier integration test
  • Loading branch information
HealthyPear authored Mar 30, 2021
2 parents 4c7a7fe + ac3c4a4 commit b58e7ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion protopipe/scripts/tests/test_classifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ General:
outdir: '[...]/shared_folder/analyses/v0.4.0_dev1/estimators/gamma_hadron_classifier'

Split:
train_fraction: 0.8
train_fraction: 0.5
use_same_number_of_sig_and_bkg_for_training: False # Lowest statistics will drive the split

Method:
Expand Down
4 changes: 2 additions & 2 deletions protopipe/scripts/tests/test_config_analysis_south.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ ImageCleaning:
ImageSelection:
charge: [50., 1e10]
pixel: [3, 1e10]
ellipticity: [0.1, 0.6]
nominal_distance: [0., 0.8] # in camera radius
ellipticity: [0.1, 0.8]
nominal_distance: [0., 1.] # in camera radius

# Minimal number of telescopes to consider events
Reconstruction:
Expand Down
3 changes: 1 addition & 2 deletions protopipe/scripts/tests/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def test_GET_PROTONS_FOR_CLASSIFICATION_MODEL(test_case, pipeline_testdir):
command = f"python {data_training.__file__}\
--config_file {input_data[test_case]['config']}\
-o {outpath}\
-m 10\
-i {input_data[test_case]['proton1'].parent}\
-f {input_data[test_case]['proton1'].name}\
--estimate_energy True\
Expand Down Expand Up @@ -225,7 +224,7 @@ def test_BUILD_CLASSIFICATION_MODEL_RandomForest(test_case, pipeline_testdir):
infile_background = pipeline_testdir / f"test_proton1_noImages_{test_case}.h5"
outdir = pipeline_testdir / f"classification_model_{test_case}"

config = resource_filename("protopipe", "scripts/tests/test_regressor.yaml")
config = resource_filename("protopipe", "scripts/tests/test_classifier.yaml")

command = f"python {build_model.__file__}\
--config_file {config}\
Expand Down

0 comments on commit b58e7ec

Please sign in to comment.