Skip to content
Open
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
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,37 @@ those changes.

## [Unreleased]

## [1.55.0] - 2026-07-16

### Added

- `batch.BatchPCA`: batchwise-unfolded (multiway) PCA for batch trajectory
data. Unfolds an aligned batch-data dictionary batchwise (one row per batch),
optionally joins an initial-conditions (Z) block onto that row, mean-centres
and scales every column, and fits the existing `multivariate.PCA` by
composition. Exposes batch-level scores, SPE and Hotelling's T2 with control
limits, plus contribution and score/SPE/loading plot forwarders. This is the
Nomikos-MacGregor batch monitoring model.
- `batch.time_varying_loading_plot` and `batch.contribution_at_time_plot`: two
plotly plots for the unfolded model, showing a component's loadings over time
(one trace per tag) and the per-tag contribution to SPE or T2 at a chosen
time sample.
- `batch.load_nylon`, `batch.load_dryer`, and `batch.load_batch_fake_data`:
loader functions returning the bundled batch datasets as the standard
batch-data dictionary.

### Changed

- The `batch.data_input` converters `melted_to_wide`, `wide_to_dict`, and
`wide_to_melted` are now implemented (they previously returned an empty
dict / frame / `None`). They compose the existing conversions and round-trip
with `dict_to_wide` / `dict_to_melted`.

### Fixed

- `batch.plotting.plot_to_HTML` now passes the correct `responsive` Plotly
config key (previously the misspelled `resonsive` was silently ignored).

## [1.54.0] - 2026-07-13

### Changed
Expand Down Expand Up @@ -2509,7 +2540,8 @@ this entry records them together.
- Reworked the README with a sharper value proposition and a
"Why not scikit-learn?" comparison table.

[Unreleased]: https://github.com/kgdunn/process-improve/compare/v1.54.0...HEAD
[Unreleased]: https://github.com/kgdunn/process-improve/compare/v1.55.0...HEAD
[1.55.0]: https://github.com/kgdunn/process-improve/compare/v1.54.0...v1.55.0
[1.54.0]: https://github.com/kgdunn/process-improve/compare/v1.53.0...v1.54.0
[1.53.0]: https://github.com/kgdunn/process-improve/compare/v1.52.4...v1.53.0
[1.52.4]: https://github.com/kgdunn/process-improve/compare/v1.52.3...v1.52.4
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ authors:
repository-code: "https://github.com/kgdunn/process-improve"
url: "https://kgdunn.github.io/process-improve/"
license: MIT
version: 1.54.0
date-released: "2026-07-13"
version: 1.55.0
date-released: "2026-07-16"
keywords:
- chemometrics
- multivariate analysis
Expand Down
12 changes: 12 additions & 0 deletions docs/api/batch.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Batch Data Analysis
===================

.. automodule:: process_improve.batch.datasets
:members:
:show-inheritance:

.. autoclass:: process_improve.batch.BatchPCA
:members:
:show-inheritance:

.. automodule:: process_improve.batch._batch_plots
:members:
:show-inheritance:

.. automodule:: process_improve.batch.features
:members:
:undoc-members:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "process-improve"
version = "1.54.0"
version = "1.55.0"
description = 'Designed Experiments; Latent Variables (PCA, PLS, multivariate methods with missing data); Process Monitoring; Batch data analysis.'
readme = "README.md"
license = "MIT"
Expand Down
22 changes: 21 additions & 1 deletion src/process_improve/batch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
"""Batch process data analysis: alignment, feature extraction, and visualization."""
"""Batch process data analysis: alignment, feature extraction, modelling, and visualization."""

from process_improve.batch._batch_pca import BatchPCA
from process_improve.batch._batch_plots import (
contribution_at_time_plot,
time_varying_loading_plot,
)
from process_improve.batch.data_input import (
check_valid_batch_dict,
dict_to_melted,
dict_to_wide,
melted_to_dict,
melted_to_wide,
wide_to_dict,
wide_to_melted,
)
from process_improve.batch.datasets import (
load_batch_fake_data,
load_dryer,
load_nylon,
)
from process_improve.batch.features import (
cross,
f_agemax,
Expand Down Expand Up @@ -36,10 +47,13 @@
)

__all__ = [
# Modelling
"BatchPCA",
# Preprocessing/alignment
"batch_dtw",
# Data input/conversion
"check_valid_batch_dict",
"contribution_at_time_plot",
"cross",
"determine_scaling",
"dict_to_melted",
Expand All @@ -63,8 +77,14 @@
"f_std",
"f_sum",
"find_reference_batch",
# Dataset loaders
"load_batch_fake_data",
"load_dryer",
"load_nylon",
"melted_to_dict",
"melted_to_wide",
"resample_to_reference",
"time_varying_loading_plot",
"wide_to_dict",
"wide_to_melted",
]
Loading