Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
e18131d
Rename Bayesian MAP labels to best posterior sample
AndrewSazonov May 15, 2026
92de15d
Add ADR for fit mode categories
AndrewSazonov May 16, 2026
0cf6306
Refine fit-mode categories ADR with active-sibling pattern
AndrewSazonov May 16, 2026
7c6f4c7
Add open questions and drop fitting.mode mirror in ADR
AndrewSazonov May 16, 2026
64e3fd7
Add implementation plan for fit-mode-categories ADR
AndrewSazonov May 16, 2026
3f4fdf6
Rename CIF field _fitting.mode to _fitting.mode_type
AndrewSazonov May 16, 2026
3d8fe8d
Tighten high-risk steps in fit-mode-categories plan
AndrewSazonov May 16, 2026
31b23b6
Add BoolDescriptor for CIF-bound boolean values
AndrewSazonov May 16, 2026
8796f27
Add fitting category replacing fit configuration surface
AndrewSazonov May 16, 2026
5c04410
Add fitting_mode_type selector and fitting accessor on Analysis
AndrewSazonov May 16, 2026
ecfd8e7
Rename joint_fit_experiments category to joint_fit
AndrewSazonov May 16, 2026
7b518bb
Add sequential_fit category with persisted scan settings
AndrewSazonov May 16, 2026
dfabd39
Add sequential_fit_extract category for scan metadata rules
AndrewSazonov May 16, 2026
c778383
Replace fit category with Analysis.fit() method
AndrewSazonov May 16, 2026
2cf26c3
Drive sequential fitting from sequential_fit settings
AndrewSazonov May 16, 2026
67bf6c8
Auto-populate joint_fit rows and validate before fitting
AndrewSazonov May 16, 2026
2faef00
Add instance-aware help filter and hide inactive mode categories
AndrewSazonov May 16, 2026
e2e260c
Serialize only active mode-specific analysis categories
AndrewSazonov May 16, 2026
51ca411
Restore mode before mode-specific analysis sections
AndrewSazonov May 16, 2026
55ee246
Update tutorials, docs, and exports for new fitting API
AndrewSazonov May 16, 2026
c9f4e54
Resolve ZIP extraction relative to saved project
AndrewSazonov May 16, 2026
e2bccd7
Add live progress tables for sequential fitting
AndrewSazonov May 16, 2026
a1326e3
Set sequential fitting mode and save project
AndrewSazonov May 16, 2026
060943a
Complete fit-mode categories and refactor progress
AndrewSazonov May 16, 2026
7fb3c9f
Fix sequential replay, styling, and docs
AndrewSazonov May 16, 2026
ce8619a
Simplify sequential progress table headers
AndrewSazonov May 16, 2026
bb3ff12
Add progress and time columns to sequential tables
AndrewSazonov May 16, 2026
a5924c2
Unify sequential and single fit spinners on ActivityIndicator
AndrewSazonov May 16, 2026
653b879
Fix spacing in chunk file range display
AndrewSazonov May 16, 2026
fe84092
Render sequential progress as bordered table with index column
AndrewSazonov May 16, 2026
3009424
Render sequential progress with shared single-fit table renderable
AndrewSazonov May 16, 2026
306ecc2
Add fit.series_all to plot every fitted parameter
AndrewSazonov May 16, 2026
5dc87bd
Unify fit.series to plot single or all fitted parameters
AndrewSazonov May 16, 2026
057c5e8
Encapsulate chunk progress in dataclass
AndrewSazonov May 16, 2026
bf0e120
Use string paths for versus parameter
AndrewSazonov May 16, 2026
5a27519
Unify ASCII plot width handling across terminal charts
AndrewSazonov May 16, 2026
cd01b54
Sort ASCII parameter series by x before plotting
AndrewSazonov May 16, 2026
deda38f
Skip fit reports for sequential mode
AndrewSazonov May 16, 2026
54422e1
List all analysis files on save
AndrewSazonov May 16, 2026
e6797c3
Bump dependencies
AndrewSazonov May 16, 2026
0c82f76
Add resumed sequential-fit tutorial for Co2SiO4
AndrewSazonov May 16, 2026
788f8f3
Update data index reference and hash
AndrewSazonov May 16, 2026
6ab1994
Clear sequential fit state and make ZIP extraction explicit
AndrewSazonov May 16, 2026
f48ea6f
Update data index reference and hash
AndrewSazonov May 16, 2026
9842bb9
Normalize sequential CSV paths for resumed fits
AndrewSazonov May 16, 2026
6ad727d
Update data index reference and hash
AndrewSazonov May 16, 2026
339e0fc
Add resume fit tutorial and fix paths
AndrewSazonov May 16, 2026
7b514fd
Normalize CSV relative paths to POSIX style
AndrewSazonov May 16, 2026
6f0eb00
Remove project save step from tutorial
AndrewSazonov May 16, 2026
367eef2
Accept fit-mode categories ADR
AndrewSazonov May 17, 2026
a7560bf
Move Quick Reference to end of nav
AndrewSazonov May 17, 2026
2a618b0
Lower coverage threshold to 65%
AndrewSazonov May 17, 2026
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
43 changes: 22 additions & 21 deletions docs/dev/ADR-suggestions/adr_parameter-posterior-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ model.
### 2. Reuse the existing Bayesian summary container

Do not add separate flat parameter attributes such as `median`,
`map_estimate`, `interval_95`, `r_hat`, or `ess_bulk`.
`best_sample_value`, `interval_95`, `r_hat`, or `ess_bulk`.

Instead, the parameter-level projection reuses the existing
`PosteriorParameterSummary` object already produced for
Expand All @@ -63,7 +63,7 @@ inspection, and later persistence.

The summary object currently provides the right level of detail:

- `map_estimate`
- `best_sample_value`
- `median`
- `uncertainty`
- `interval_68`
Expand All @@ -87,7 +87,7 @@ The internal field names stay compact and code-oriented. User-facing
tables, summaries, and plot annotations should use these friendly
labels:

- `map_estimate` -> `MAP estimate`
- `best_sample_value` -> `Best posterior sample`
- `median` -> `Median`
- `uncertainty` -> `Standard uncertainty`
- `interval_68` -> `68% credible interval`
Expand All @@ -109,7 +109,7 @@ current_value = param.value
current_uncertainty = param.uncertainty

if param.posterior is not None:
map_estimate = param.posterior.map_estimate
best_sample_value = param.posterior.best_sample_value
median = param.posterior.median
uncertainty = param.posterior.uncertainty
low95, high95 = param.posterior.interval_95
Expand Down Expand Up @@ -187,15 +187,15 @@ The exact helper names can be refined during implementation, but the
design requirement is fixed: manual user edits clear stale metadata,
while internal fit application installs fresh metadata atomically.

### 8. Commit MAP to `parameter.value` after Bayesian fits
### 8. Commit best posterior sample to `parameter.value` after Bayesian fits

After a posterior-capable fit, `parameter.value` is committed from the
maximum-a-posteriori estimate.
best posterior sample.

MAP is chosen because it is a coherent joint point estimate across all
free parameters. Marginal medians remain available on
`parameter.posterior`, but they are summary data rather than the active
live model state.
The best posterior sample is chosen because it is a coherent joint point
estimate across all free parameters. Marginal medians remain available
on `parameter.posterior`, but they are summary data rather than the
active live model state.

### 9. Keep `uncertainty` as a convenience scalar after Bayesian fits

Expand Down Expand Up @@ -279,7 +279,7 @@ Stores one saved Bayesian result header with these fields:
- `has_posterior_predictive`
- `sidecar_file`

For the current design, `point_estimate_name` is always `map`.
For the current design, `point_estimate_name` is always `best_sample`.

#### 11.3 `_bayesian_sampler` single item

Expand Down Expand Up @@ -320,7 +320,7 @@ Fields:
- `order_index`
- `unique_name`
- `display_name`
- `map_estimate`
- `best_sample_value`
- `median`
- `uncertainty`
- `interval_68_lower`
Expand All @@ -342,7 +342,7 @@ Fields:
- `experiment_name`
- `x_axis_name`
- `x_path`
- `map_prediction_path`
- `best_sample_prediction_path`
- `lower_95_path`
- `upper_95_path`
- `lower_68_path`
Expand Down Expand Up @@ -382,7 +382,7 @@ cosio.atom_site.Co2.adp_iso 0.0000 0.1200 4.0 0.0312 0.0021

_bayesian_result.schema_version 1
_bayesian_result.sampler_name dream
_bayesian_result.point_estimate_name map
_bayesian_result.point_estimate_name best_sample
_bayesian_result.success yes
_bayesian_result.sampler_completed yes
_bayesian_result.reduced_chi_square 1.031
Expand Down Expand Up @@ -413,7 +413,7 @@ loop_
_bayesian_parameter_posterior.order_index
_bayesian_parameter_posterior.unique_name
_bayesian_parameter_posterior.display_name
_bayesian_parameter_posterior.map_estimate
_bayesian_parameter_posterior.best_sample_value
_bayesian_parameter_posterior.median
_bayesian_parameter_posterior.uncertainty
_bayesian_parameter_posterior.interval_68_lower
Expand All @@ -429,15 +429,15 @@ loop_
_bayesian_predictive_dataset.experiment_name
_bayesian_predictive_dataset.x_axis_name
_bayesian_predictive_dataset.x_path
_bayesian_predictive_dataset.map_prediction_path
_bayesian_predictive_dataset.best_sample_prediction_path
_bayesian_predictive_dataset.lower_95_path
_bayesian_predictive_dataset.upper_95_path
_bayesian_predictive_dataset.lower_68_path
_bayesian_predictive_dataset.upper_68_path
_bayesian_predictive_dataset.draws_path
_bayesian_predictive_dataset.n_x
_bayesian_predictive_dataset.n_draws_cached
hrpt ttheta /predictive/hrpt/x /predictive/hrpt/map_prediction /predictive/hrpt/lower_95 /predictive/hrpt/upper_95 /predictive/hrpt/lower_68 /predictive/hrpt/upper_68 /predictive/hrpt/draws 2500 200
hrpt ttheta /predictive/hrpt/x /predictive/hrpt/best_sample_prediction /predictive/hrpt/lower_95 /predictive/hrpt/upper_95 /predictive/hrpt/lower_68 /predictive/hrpt/upper_68 /predictive/hrpt/draws 2500 200
```

### 12. Persist bulk arrays in `analysis/bayesian_data.h5`
Expand Down Expand Up @@ -482,7 +482,7 @@ ordering.
Recommended HDF5 dataset naming is:

- `predictive__<experiment>__x`
- `predictive__<experiment>__map_prediction`
- `predictive__<experiment>__best_sample_prediction`
- `predictive__<experiment>__lower_95`
- `predictive__<experiment>__upper_95`
- `predictive__<experiment>__lower_68`
Expand All @@ -497,7 +497,7 @@ Recommended HDF5 group layout is:
- `/posterior/log_posterior`
- `/posterior/draw_index`
- `/predictive/<experiment>/x`
- `/predictive/<experiment>/map_prediction`
- `/predictive/<experiment>/best_sample_prediction`
- `/predictive/<experiment>/lower_95`
- `/predictive/<experiment>/upper_95`
- `/predictive/<experiment>/lower_68`
Expand Down Expand Up @@ -573,7 +573,7 @@ param = project.phases['lbco'].cell.length_a
posterior = param.posterior

if posterior is not None:
print(posterior.map_estimate)
print(posterior.best_sample_value)
print(posterior.uncertainty)
print(posterior.interval_68)

Expand Down Expand Up @@ -673,7 +673,8 @@ It still defers:

## Chosen Defaults

- `parameter.value` remains committed to MAP after posterior fits.
- `parameter.value` remains committed to the best posterior sample after
posterior fits.
- If a project is loaded without full posterior arrays, restoring only
`parameter.posterior` is acceptable for table display and parameter
inspection.
Expand Down
7 changes: 4 additions & 3 deletions docs/dev/ADRs/adr_display-ux.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ project.display.parameters.cif_uids()

project.display.fit.results()
project.display.fit.correlations()
project.display.fit.series(param, versus=temperature)
project.display.fit.series(param, versus='diffrn.ambient_temperature')

project.display.posterior.pairs()
project.display.posterior.distribution(param)
Expand Down Expand Up @@ -197,7 +197,8 @@ Use these naming rules:
- `fit.correlations()` shows parameter relationships from the latest
fit.
- `fit.series(param, versus=...)` shows fitted parameter values across a
sequence of fit results or experiments.
sequence of fit results or experiments, using a persisted `diffrn.*`
path for `versus`.
- `posterior.*` names are used only when posterior samples are required.

## Rejected Alternatives
Expand All @@ -209,7 +210,7 @@ project.display.pattern(expt_name='hrpt')
project.display.parameters(scope='free')
project.display.fit_results()
project.display.correlations()
project.display.parameter_series(param, versus=temperature)
project.display.parameter_series(param, versus='diffrn.ambient_temperature')
project.display.posterior_pairs()
project.display.posterior_distribution(param)
project.display.posterior_predictive(expt_name='hrpt')
Expand Down
Loading
Loading