Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
fail-fast: false
matrix:
py:
- "3.14"
- "3.13"
- "3.12"
- "3.11"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
version: "0.11.16"
enable-cache: true
- name: Install the project
run: uv sync --locked --all-extras --extra doc
run: uv sync --locked --all-extras
- name: Sphinx build
run: uv run sphinx-build doc _build
- name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ jobs:
with:
version: "0.11.16"
- name: Publish Resourcecode 📦 to TestPyPI
run: uv publish --token ${{ secrets.TEST_PYPI_TOKEN }} --publish-url https://test.pypi.org/legacy/
run: uv publish --publish-url https://test.pypi.org/legacy/
14 changes: 7 additions & 7 deletions doc/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**00:10.513** total execution time for 5 files **from all galleries**:
**00:26.067** total execution time for 5 files **from all galleries**:

.. container::

Expand All @@ -32,18 +32,18 @@ Computation times
* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_auto_examples_plot_4_Producible.py` (``..\examples\plot_4_Producible.py``)
- 00:10.513
* - :ref:`sphx_glr_auto_examples_plot_2_Multivariate_Extremes.py` (``../examples/plot_2_Multivariate_Extremes.py``)
- 00:26.067
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_0_Database_exploration.py` (``..\examples\plot_0_Database_exploration.py``)
* - :ref:`sphx_glr_auto_examples_plot_0_Database_exploration.py` (``../examples/plot_0_Database_exploration.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_1_data_extraction.py` (``..\examples\plot_1_data_extraction.py``)
* - :ref:`sphx_glr_auto_examples_plot_1_data_extraction.py` (``../examples/plot_1_data_extraction.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_2_Multivariate_Extremes.py` (``..\examples\plot_2_Multivariate_Extremes.py``)
* - :ref:`sphx_glr_auto_examples_plot_3_Operation_Planning.py` (``../examples/plot_3_Operation_Planning.py``)
- 00:00.000
- 0.0
* - :ref:`sphx_glr_auto_examples_plot_3_Operation_Planning.py` (``..\examples\plot_3_Operation_Planning.py``)
* - :ref:`sphx_glr_auto_examples_plot_4_Producible.py` (``../examples/plot_4_Producible.py``)
- 00:00.000
- 0.0
9 changes: 6 additions & 3 deletions resourcecode/eva/censgaussfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def censgaussfit(data: np.ndarray, q: float) -> OptimizeResult:

tail_dependency_obs = sum(mask) / data.shape[0]
th_norm = norm.ppf(q)
n_vars = data.shape[1]

def fitness(cov):
# For the 2D case, we have only one parameter
Expand All @@ -62,16 +63,18 @@ def fitness(cov):
set_trig(sigma, cov, "upper")
set_trig(sigma, cov, "lower")
else:
sigma = cov
sigma = np.eye(2)
sigma[0, 1] = cov[0]
sigma[1, 0] = cov[0]

# Check if sigma is positive semi-definite
eigenvalues = np.linalg.eigvalsh(sigma)
if not np.all(eigenvalues >= -1e-10):
# Return a large penalty for non-PSD matrices
return 1e10

rv = multivariate_normal(mean=np.zeros(len(cov)), cov=sigma, allow_singular=True)
upper_point = np.full(len(cov), th_norm)
rv = multivariate_normal(mean=np.zeros(n_vars), cov=sigma, allow_singular=True)
upper_point = np.full(n_vars, th_norm)
prob = 1 - rv.cdf(upper_point)

return (tail_dependency_obs - prob) ** 2
Expand Down
4 changes: 2 additions & 2 deletions resourcecode/eva/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def run_simulation(
set_trig(sigma, rho, "lower")
else:
sigma = np.eye(2)
sigma[1, 0] = rho
sigma[0, 1] = rho
sigma[1, 0] = rho[0]
sigma[0, 1] = rho[0]

result = None
while result is None or len(result) < n_simulations:
Expand Down
Loading