Changelog

All notable changes to this project are documented here. The format follows Keep a Changelog, and the project uses Semantic Versioning.

Unreleased

1.4.0 - 2026-11-16

Changed

  • Training is much faster. The trees are trained at the same time instead of one after another, and so are the learning rates tried by the hyperparameter search. Minibatches are taken straight from the data tensors instead of through a DataLoader. On 1,000 rows, fitting 5 trees is about 10 times faster on the CPU and the learning rate search about 13 times faster. Results for a given random_state can differ slightly from 1.3.1, since the order of floating point operations changed.

Added

  • device="auto" uses CUDA if it is available, then MPS, then the CPU.

Fixed

  • Training on a GPU (device="cuda") no longer fails with a device mismatch.

1.3.1 - 2026-11-15

Fixed

  • nninfo_["initial_weights"] and nninfo_["initial_biases"] hold the weights each network started from. On CPU they used to change along with the network during training and ended up equal to the final weights.

Documentation

  • New benchmarks page comparing tree initialization with random initialization of the same networks. The script is in benchmarks/.

1.3.0 - 2026-10-27

Added

  • DJINN_Regressor.calibrate() and predict_interval() give prediction intervals with a chosen coverage, using split conformal prediction on held-out data. The intervals are kept by save() and cleared when the model is fit again.

  • clip_inputs option for both models. When it’s on, inputs are clipped to the training range before predicting, which stops the networks from extrapolating far outside the data. It is off by default.

Documentation

  • The bma_predict() docstring, the theory and usage pages and the uncertainty notebook say that the dropout percentiles aren’t calibrated. On the datasets we tried, the 25-75% band held only 20-50% of the true values. The notebook now shows calibrated intervals as well.

1.2.1 - 2026-10-11

Fixed

  • continue_training() updates the networks that predict() uses. It used to update only the checkpoints on disk, so predictions didn’t change until the model was loaded again.

Documentation

  • The docs have new pages on how DJINN works, a user guide, using DJINN with scikit-learn, the API and citing DJINN.

  • Six example notebooks, which can be downloaded or opened in Colab, replace the scripts in examples/.

  • Docstrings list the fitted attributes of both models.

1.2.0 - 2026-10-10

Added

  • DJINN_Regressor and DJINN_Classifier are scikit-learn estimators. They work with clone, Pipeline, cross_val_score and GridSearchCV, and pass scikit-learn’s estimator checks except a few that use data too small to grow a tree deeper than 1.

  • epochs, learning_rate, batch_size, weight_decay, random_state, device and verbose constructor options.

  • DJINN_Classifier.predict_proba() and classes_. Class labels can be any values, such as strings or 1..k.

  • Lists and pandas DataFrames are accepted as input, and DataFrame column names are stored in feature_names_in_.

Changed

  • fit(X, y) takes its options from the constructor and returns the model. Passing options to fit() still works but is deprecated and will be removed in 2.0.

  • fit() and train() no longer write files by default. Use save(), or pass save_model=True to train().

  • predict() returns shape (n,) when the model was trained on a 1-D target, and regression predictions are float64.

  • predict() rejects 1-D input; pass one sample as X[[i]].

  • Progress messages are off unless verbose=1. Hitting the epoch limit in the hyperparameter search raises a ConvergenceWarning instead of printing.

  • get_hyperparameters() runs on the model’s device; it used to pick the GPU whenever one was available.

  • DJINN_Classifier no longer subclasses DJINN_Regressor, and the constructors no longer accept **kwargs.

  • Requires scikit-learn 1.6 or newer.

Fixed

  • load() returns a DJINN_Classifier for saved classifiers. They used to come back as regressors and fail to predict.

  • Fitting again on new data rescales to that data instead of reusing the scaling from the first fit.

1.1.2 - 2026-10-05

Fixed

  • get_hyperparameters(seed=...) is now reproducible. The learning-rate search drew its initial biases from OS entropy and ran dropout on the unseeded global torch RNG, so the same seed could select a different learning rate on each call.

Changed

  • Minibatches are now drawn the way the original TensorFlow DJINN draws them: each epoch samples len(X) // batch_size full batches with replacement, instead of a shuffled pass over every row. This closes a ~0.02 R² gap to the TensorFlow baseline on the diabetes benchmark. Trained models and selected hyperparameters will differ from 1.1.1 for the same seed.

  • CI runs on Ubuntu 26.04 with Node 24 versions of the GitHub Actions.

1.1.1 - 2026-10-04

Fixed

  • save() writes the trained models held in memory instead of copying <model_path>/<model_name> from disk. It previously failed when train() ran with save_model=False and could save a stale model from an earlier run.

  • save() raises RuntimeError when no model has been trained or loaded.

1.1.0 - 2026-10-04

First release on PyPI as djinnml. DJINN is reimplemented in PyTorch; the public API (DJINN_Regressor, DJINN_Classifier, train, fit, predict, bma_predict, save, load) matches the original TensorFlow version.

Added

  • Statistical comparison suite against a committed TensorFlow baseline.

  • Support for Python 3.10–3.14.

Changed

  • save() requires overwrite=True before replacing an existing directory.

  • Dropped Python 3.8 and 3.9.

Fixed

  • Random forest trees in the ensemble are now distinct from each other.

  • tree_to_nn_weights() no longer ignores seed=0.

  • predict() is deterministic when dropout is enabled.

  • find_optimal_epochs() no longer crashes when max_training_epochs <= 200.

  • Trees too shallow to build a hidden layer raise a clear error.