Skip to content

Commit

Permalink
add default for confidence
Browse files Browse the repository at this point in the history
  • Loading branch information
menegon committed Apr 8, 2021
1 parent c8d699f commit 007bce1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools4msp/modules/sua.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import logging
import numpy as np
import pandas as pd
# for loading patched function. This have to be before salib import
from .salib_util_patch import _nonuniform_scale_samples
from SALib.sample import saltelli
from SALib.analyze import sobol
from joblib import Parallel, delayed
from copy import deepcopy
from .salib_util_patch import _nonuniform_scale_samples # for loading patched function

logger = logging.getLogger('tools4msp.sua')

Expand Down Expand Up @@ -203,7 +204,7 @@ def set_problem(self):
self.normalize_distance = None

sensitivities = module_cs.sensitivities
sensitivities.fillna({'confidence': 0.2},
sensitivities.fillna({'confidence': 0.5},
inplace=True)
sensitivities['sua_var_name'] = sensitivities['precode'] + '--' + sensitivities['envcode']
df_presenvs = module_cs.get_score_stats('presenvs')
Expand All @@ -226,6 +227,8 @@ def set_problem(self):
)

weights = module_cs.weights
weights.fillna({'confidence': 0.5},
inplace=True)
self.normalize_distance = weights.distance.max() * 2
weights['sua_var_name'] = weights['usecode'] + '--' + weights['precode']
df_usepressures = module_cs.get_score_stats('usepressures')
Expand Down

0 comments on commit 007bce1

Please sign in to comment.