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

Inconsistency of central measures in plot_direct_contribution_curves #1526

Open
PabloRoque opened this issue Feb 28, 2025 · 0 comments
Open
Labels

Comments

@PabloRoque
Copy link
Contributor

Channel contributions are aggregated using the mean of the Deterministic channel_contributions.

channel_contributions = self.compute_channel_contribution_original_scale().mean(
            ["chain", "draw"]
        )

We then overlay with the fitted params using the median:

def _plot_response_curve_fit(...):
...

    mid_params = self.format_recovered_transformation_parameters(quantile=0.5)
        y_fit = self.saturation.function(
            x=x_fit, **mid_params[channel]["saturation_params"]
        ).eval()

Easy solution:

  • Establish the point estimates of channel_contributions using median.

Better solution:

  • Enable a measure | estimand param in plot_direct_contribution_curves (possibly involving an Enum) that allows the user to select the measure of the point estimates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants