# version 0.15
A number of new functions have been implemented and we decided to use a new version numbering system to improve consistency.

# version 0.16
Minor bug fix relative to release 0.15. Fixed a transpose operation that would cause normative.py to fail in certain cases

# version 0.17:
- New syntax for functions related to parallelization (python path is automatically generated)
- Support for slurm clusters has been added
- Updates to hierarchical Bayesian regression (different priors for intercepts and noise) for improved transfer
- Updated parameterisation for likelihood warping for improved stability
- Now uses a fixed pickle protocol for better interoperability
- Addition of a utility function for loading freesurfer measures
- Updated sphinx documentation

# version 0.18
- addition of cross-validation functionality for HBR
- minor bug fixes for HBR

# version 0.19
- separate standardization of responses and covariates
- standardization is no longer on by default
- new standardization methods
- pymc3 version fixed
- minor bugs resolved (CV with HBR)

# version 0.20
- Major code refactoring
- Requirements updated for python 3.8.3
- Updates to documentation and Integrations with Read the Docs
- Addition of tutorial material
- Performance improvements for BLR (not compatible with previous versions)
- Addition of heteroskedastic noise for BLR
- Addition of Bayesian Information Criterion for BLR
- Addition of utility functions (e.g. design matrix construction)
- Several minor bug fixes (mostly related to HBR and BLR)

version 0.21
Relatively minor updates with respect to version 0.20, including:
- documentation updates
- minor updates to warp (including bug fix for the compostition)
- software version is saved in models
- utility functions for calibration descriptives and extreme values

version 0.22
Some minor updates and bug fixes:
- updates to documentation and tutorials
- updates to normative_parallel (interactive usage)
- updates to HBR (merge functionality)
- other minor bug fixes related to cross-validation (computation of error metrics), import problems and calibration statistics

version 0.23
- SHASH functionality for HBR added
- Bug fix for normative model predict() function

# version 0.24
- Minor bug fix related to SHASH/HBR
- Added change log

# version 0.25
- Minor bug fixes related to imports
- Minor bug fixes related to SHASH/HBR
- Minor bug fix in normative.py (affecting SMSE)

# version 0.26
- Multiple bug fixes, relating to imports, predict() and transfer() functions
- Added support for web portal
- Provided a wrapper for blr to use transfer() functionality 
- Also streamlined tutorials (PCNtoolkit-demo), so that all tutorials run with this version

# version 0.27
- Configured more sensible default options for HBR (random slope and intercept for mu and random intercept for sigma)
- Fixed a translation problem between the previous naming convention for HBR models (only Gaussian models) and the current naming (also SHASH models)
- Minor updates to fix synchronisation problems in PCNportal (related to the HBR updates above)
- Added configuration files for containerisation with Docker

# version 0.28
- Updated to PyMC5 (including migrating back-end to PyTensor)
- Added support for longitudinal normative modelling with BLR (see Buckova-Rehak et al 2023)
- Changed default optimiser for trend surface models (for scalability)

# version 0.29
- Bug fixes (e.g. HBR predict crash, normative_paralell support for .txt input)
- Added docstrings for most functions
- Fixed some problems with exception handling
- Formatted whole project with autopep8
- Addedd functionality to compute SHASH z-scores from normative.py
- Updated requirements
- Basic pytest continuous integration framework implemented

# version 1.0.0
Major code refactor (effectively a re-write of the toolbox). Key changes include:

- Improved object-orientation
- Improved code readability
- Improved in-line documentation
- Human readable models (JSON format)
- Improved extendability
- Algorithmic improvements, e.g. merge, extend, transfer, harmonise, synthesize and improvments to HBR
- Completely revised documentation
- No longer supports Gaussian process regression
- Updated cluster job submission system
- IMPORTANT:
Models estimated on earlier versions of PCNtoolkit (up until v0.39) are NOT COMPATIBLE with this release. Please install the old version to continue working with legacy models

# Version 1.0.1

**Major changes:**
1. NormativeModel.merge implemented, completing the federated learning arsenal
2. BLR transfer implemented
3. HBR model comparison using WAIC convenience function in `util.model_comparison.py`

**Other nice things**
1. Implemented ARD for BLR
2. Yhat estimation with importance weighting as default method
3. Fixed effect in the slope of mean and variance in BLR
5. Add vertical conditional density plots to `plot_centiles` function
6. Outlier detection and removal in NormData.from_dataframe
7. Model factory for common regression models 

**Minor changes:**
1. Much faster `map_batch_effects`
2. Runner loads data results back into NormData objects when parallelise=True and observed=True
3. Remove Torch from dependencies
4. Better support for dataloading from ndarrays
5. Explained Variance in the measures dataframe
6. Avoid annoying Pandas warning in the plotter

# Version 1.1.0

**Major changes**
1. Add support for `evaluate_logp` for transfered BLR models

**Bug fixes**
1. Fix incorrect application of change-of-variables in BLR `evaluate_logp`
1. Correctly use semantic versioning
1. Correctly use the `__version__` attribute


# Version 1.1.2

**Changes**
1. Better default centile plot
2. Improve MSLL computation
3. Speedup model comparison
4. Change default Normal likelihood
5. Save predictions in normal order
6. Switch to SKLearn MAPE
7. Add centered random parameterization
8. Change default random offset distribution to ZeroSumNormal

**Bug fixes**
1. Fix bug with re-submitting a runner's failed jobs
2. Fix bug with incremental file backup function
3. Solve problem that occurs when both n_batches and batch_size are specified
4. Small updates to default prior settings in HBR
5. Improve MSLL computation
6. Fix bug with nm.predict, it is now fully in-place on the Normdata
7. Fix transfer bug for HBR

# Version 1.2.0

**Major changes:**
1. Enforce positivity to your centiles plot using the y_transform keyword argument in NormativeModel
3. Remove python 3.10 support 
3. Replace "fcntl" package with "filelock" to allow Windows support
4. Update contribution guide in the website and add a troubleshooting section


**Minor changes:**
1. Add copilot-instructions.md 
2. Small fixes in plot_centiles_advanced and plot_centiles

**Bug fixes**
1. Fix MSLL computation
2. Refactor logging for BLR: add warnings and errors related to optimizers and warping
