pycse 2.12 is out

python
pycse
pycse 2.12 brings real L-BFGS for the JAX models, Zentropy-enhanced neural networks, consistent prediction intervals, and a long list of fixes.
Author

John Kitchin

Published

October 15, 2026

pycse logo

pycse 2.12.0 is on PyPI. This is a bigger release than usual, and a few of the changes will alter results or break existing code, so it is worth reading the first section before upgrading.

pip install --upgrade pycse

Changes that may affect your code

pycse now requires Python 3.12 or newer, and the JAX stack moves up to jax>=0.10, flax>=0.12.7 and optax>=0.2.5.

Prediction intervals from predict() and polyval() now have shape (n, 2) instead of (2, n), the same as nlpredict() has always returned. Column 0 is the lower bound and column 1 the upper bound. If you unpack the intervals, the fix is one transpose:

y, yint, se = predict(X, y, pars, XX)
lower, upper = yint.T    # was: lower, upper = yint

The optimizer="bfgs" and "lbfgs" options in the JAX models (DPOSE, KAN, KANLLPR, KfoldNN and SISSOEnsemble) now run a real L-BFGS with a line search from optax. Before, they ran Adam with a cosine schedule. Your fits will be different, and they should actually be converged now. If you need the old behavior, use optimizer="adam_cosine".

JAXMonotonicRegressor is now only monotone by default. It used to be convex as well, which meant concave or S-shaped monotone data could not be fitted. Pass convexity="convex" to get the old behavior, or convexity="concave" for the other case.

What is new

The largest addition is pycse.sklearn.zenn, an independent JAX/Flax implementation of Zentropy-Enhanced Neural Networks from Wang, Shang, Liu and Hao, “ZENN: A thermodynamics-inspired computational framework for heterogeneous data-driven modeling,” PNAS 123(1), e2511227122 (2026). It provides ZENNRegressor, ZENNRegressorNLL and ZENNClassifier. Like the other models in pycse.sklearn, they follow the scikit-learn estimator API.

LeafModelRegressor(refine_splits=True) chooses each split threshold for the leaf model instead of for constant leaves, so the breakpoints land in the right place for piecewise-linear data. The active learning tools picked up a penalty_scale option for penalized batches, and ActiveSurrogate.build() and LatinSquare take a random_state so results are reproducible.

The MCP server works with both the 1.x and 2.x versions of mcp, and the Claude Code skill installed by pycse skill install was rewritten. It now covers the regression functions, all of the sklearn models, design of experiments and active learning.

Fixes

pycse.__version__ finally reports the installed version. nlpredict() works for a single prediction point, NNGMM works on Python 3.12, and NNBR reports the correct standard deviation of the intercept. In active learning, penalized batches no longer contain duplicate points and ThompsonSampling makes a new draw on every call. The hashcache backends return NumPy arrays and tuples with their original types, and pycse.sklearn now imports its models lazily, so import pycse.sklearn no longer loads every backend.

The full list is in the changelog. As always, issues and pull requests are welcome on GitHub.