Skip to content

Commit

Permalink
Improved file name filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
adityasevak123ga committed Dec 6, 2023
1 parent f8de850 commit 1703714
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions uncoverml/shapley.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def __init__(self, yaml_file, main_config):
# Names of model prediction outputs
self.output_names = s['output_names'] if 'output_names' in s else None
# Path where feature files are saved
self.feature_path = s['feature_path'] if 'feature_path' in s else None
# self.feature_path = s['feature_path'] if 'feature_path' in s else None
# File from which pre-calculated shap values can be loaded
self.load_file = s['load_file'] if 'load_file' in s else None

Expand All @@ -410,7 +410,8 @@ def set_file_names(self, config):
file_names = []
for s in config.feature_sets:
for tif in s.files:
new_string = tif.replace(self.feature_path, '').replace('.tif', '')
current_feat = Path(tif)
new_string = current_feat.name
file_names.append(new_string)

self.file_names = file_names
Expand Down

0 comments on commit 1703714

Please sign in to comment.