Getting the values of the quantiles
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 576
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
Hello all,
This is not exactly an issue, it is actually a suggestion that I found useful and though that it would be nice to share it.
I needed a way to obtain the quantiles computed by corner and made these small modifications to the corner function:
- just before the for looping on the samples:
output = []
for i, x in enumerate(xs):
- In the quantiles section:
# Plot quantiles if wanted.
# also compute quantiles for output
if len(quantiles) > 0:
qvalues = quantile(x, quantiles, weights=weights)
for q in qvalues:
ax.axvline(q, ls="dashed", color=color)
if verbose:
print("Quantiles:")
print([item for item in zip(quantiles, qvalues)])
else:
qvalues = quantile(x, [0.16, 0.5, 0.84],
weights=weights)
output.append(qvalues)
- And in the return statement:
return fig,output
cheers!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the corner function and its quantile section, using the suggested output collection and return change as the scope. Check how the current return value is used before deciding on a compatible result shape. Done means callers can obtain the computed quantiles while quantile plotting and the existing defaults remain functional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100