Skip to content

ECDF-Difference Plot: Rank ECDF Line Does Not Cover Full Range [0,1] #324

@philippreiser

Description

@philippreiser

Hi!
I am using bf.diagnostics.plots.calibration_ecdf to create ECDF-Difference plots. However, I noticed that the Rank ECDF line sometimes starts after rank=0.0 and ends before rank=1.0, which I think is not expected.

Here's a minimal example:

import os

if "KERAS_BACKEND" not in os.environ:
    os.environ["KERAS_BACKEND"] = "torch"

import bayesflow as bf
import keras
import numpy as np
import matplotlib.pyplot as plt

rng = np.random.default_rng(10)

targets = rng.normal(loc = 1, scale = 0.2, size = (100, 1))
estimates = rng.normal(loc = 1, scale= 0.3, size = (100, 1))

bf.diagnostics.plots.calibration_ecdf(
    estimates=estimates, 
    targets=targets,
    difference=True,
    rank_type="fractional"
)
plt.show()

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions