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
6 changes: 6 additions & 0 deletions .changeset/ci-interval-to-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@boostv/process-optimizer-frontend-core': patch
'@boostv/process-optimizer-frontend-plots': patch
---

Format 95% credible intervals as [lower to upper] instead of [lower, upper], matching the 1D plots' hover format. Applies to the pareto front hover label and the credible-interval column under the plots (the plots package inlines these helpers and is republished to pick up the change).
2 changes: 1 addition & 1 deletion packages/core/src/common/util/scores/quality.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('displayQuality', () => {

describe('displayQualityCI', () => {
it('returns a 95% CI string from a negated value and std dev', () => {
expect(displayQualityCI(-2, 0.5)).toBe('[1.02, 2.98]')
expect(displayQualityCI(-2, 0.5)).toBe('[1.02 to 2.98]')
})

it('returns an empty string when value or stdDev is missing/zero', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/common/util/scores/quality.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const displayQualityCI = (value: number, stdDev: number): string => {
}
const lower = -value - 1.96 * stdDev
const upper = -value + 1.96 * stdDev
return `[${lower.toFixed(2)}, ${upper.toFixed(2)}]`
return `[${lower.toFixed(2)} to ${upper.toFixed(2)}]`
}

// Cost is stored as-is (not negated), so its 95% CI is value ± 1.96·σ with no
Expand All @@ -19,5 +19,5 @@ export const displayCostCI = (value: number, stdDev: number): string => {
}
const lower = value - 1.96 * stdDev
const upper = value + 1.96 * stdDev
return `[${lower.toFixed(2)}, ${upper.toFixed(2)}]`
return `[${lower.toFixed(2)} to ${upper.toFixed(2)}]`
}
Loading