Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated saltelli with sobol SALib 1.4.6+. #211

Merged
merged 2 commits into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ema_workbench/em_framework/salib_samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
from .samplers import DefaultDesigns

try:
from SALib.sample import saltelli
from SALib.sample import sobol
from SALib.sample import morris
from SALib.sample import fast_sampler
except ImportError:
warnings.warn("SALib samplers not available", ImportWarning)
saltelli = morris = fast_sampler = None
sobol = morris = fast_sampler = None

# Created on 12 Jan 2017
#
Expand Down Expand Up @@ -134,7 +134,7 @@ def __init__(self, second_order=True):
super().__init__()

def sample(self, problem, size):
return saltelli.sample(problem, size, calc_second_order=self.second_order)
return sobol.sample(problem, size, calc_second_order=self.second_order)


class MorrisSampler(SALibSampler):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"numpy",
"pandas",
"scikit-learn",
"salib",
"salib>=1.4.6",
"platypus-opt",
"matplotlib",
"statsmodels",
Expand Down