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

Collaborating on SA with SciPy #463

Open
tupui opened this issue Aug 21, 2021 · 8 comments
Open

Collaborating on SA with SciPy #463

tupui opened this issue Aug 21, 2021 · 8 comments

Comments

@tupui
Copy link
Member

tupui commented Aug 21, 2021

Following some discussion here #414 (comment)_

TL;DR I am trying to get SA into SciPy, would you be interested in helping?

I recently had a chat with Sergei Kucherenko and he is interested to contribute SA to SciPy. So far he helped me with the Sobol' sequences and OC, SA is of prime interest for him and he is finding the perspective to have SA available in SciPy interesting.

There is not much left IMHO to quick-start real discussions about a SA inclusion in SciPy. As a major SA package in Python, your inputs would be valuable. To be clear, my long term goal would not be to absorb SALib, but more to propose a collaboration. It would be like SciPy's QMC module and PyQMC. We are discussing actively with Fred Hickernell. While there are some overlaps, PyQMC is OC more feature rich and state of the art, while SciPy proposes stable and foundational parts. They actually wrap SciPy's Sobol' generators. This way PyQMC can propose the latest algorithms to practitioners. If something proves to be great, then it can be proposed to SciPy for integration. The benefit is that due to SciPy's reach, we make our fields accessible to the most.

FYI, there are some discussions on SciPy's mailing list: https://mail.python.org/pipermail/scipy-dev/2021-April/024696.html There is even a suggestion to include SALib into SciPy if you would have some interest. It would be great if you or other maintainers could drop in and comment on the whole topic, this could help the discussion!

cc @ConnectedSystems @willu47

@chahank
Copy link
Contributor

chahank commented Sep 10, 2021

Not a developer from SALib, but I integrated SALib into the climate risk package CLIMADA. I would love to see good SA in SciPy to potentially have a maybe smaller version of what SALib currently contains, but maybe more stable.

@tupui
Copy link
Member Author

tupui commented Sep 10, 2021

Not a developer from SALib, but I integrated SALib into the climate risk package CLIMADA. I would love to see good SA in SciPy to potentially have a maybe smaller version of what SALib currently contains, but maybe more stable.

Thanks @chahank. There are some movement on the mailing list, it's a heated discussion... (follow link above and here https://mail.python.org/pipermail/scipy-dev/2021-September/thread.html). Feel free to drop by!

@AdityaSavara
Copy link

I would certainly like it if Salib became a backend dependency of Scipy.

@tupui
Copy link
Member Author

tupui commented Jun 14, 2022

@AdityaSavara this would not happen. Dependencies for SciPy itself are kept at bare minimum to avoid issues (already very challenging) with any downstream packages using SciPy (a ton).

At the moment, the discussion is stalled on SciPy's side and my last attempt seeks to just add a method to compute Sobol' indices in SciPy. Feel free to comment on the mailing list, any comment would help move the discussion forward. I am still very much interested in the perspective to add basic SA into SciPy, even if it would just be a single function like Sobol'.

@tupui
Copy link
Member Author

tupui commented Mar 17, 2023

This happened and now Sobol' indices are available in SciPy (starting from 1.11). Thanks Takuya et al.! (FYI we had inputs from Saltelli and Owen during the review.)

https://scipy.github.io/devdocs/reference/generated/scipy.stats.sobol_indices.html

One possibility now would be to use SciPy's implementation in SALib. We added some mechanism that should allow us to get a similar feature set. And as usual if something is missing, please let me know and I am happy to have a look at how to improve SciPy's proposition 😃

@ConnectedSystems
Copy link
Member

What do you think the likelihood of having a range of Sobol estimators in SciPy is @tupui ?

I know Saltelli 2010 is the default now, but not sure if other estimators have been added since?

@tupui
Copy link
Member Author

tupui commented Mar 17, 2023

This is a good question. I do want to add more methods (more expression for Sobol' indices, but also maybe other methods like moment independent, etc.)

Since there was quite "politics" at play, I want to wait at least until the release to propose more. I am planning to make a communication at the SciPy2023 conference in July as well (I will of course mention you and SALib!) and I hope this will generate wide interest. All that to support future improvement proposals 😃

For now I created a tracking issue on my fork. Feel free to drop by and add anything.

tupui/scipy#14

@ConnectedSystems
Copy link
Member

FYI @samanrazavi , maybe you'd like to see VARS be a "core" SA method in SciPy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants