- sprm now takes both numeric (n,1) np matrices and (n,) np.arrays as input
Changes compared to version 0.1:
-
All functionalities can now be loaded in modular way, e.g. to use plotting functions, now source the plot function separately:
from sprm import sprm_plot -
The package now includes a robust M regression estimator (rm.py), which is a multiple regression only variant of sprm. It is based on the same iterative re-weighting scheme, buit does not perform dimension reduction, nor variable selection.
-
The robust preprocessing routine (robcent.py) has been re-written so as to be more consistent with sklearn.
All three estimators provided as separate classes in module:
from sprm import sprm
from sprm import snipls
from sprm import rm
Also, sprm now includes a check for zero scales. It will remove zero scale variables from the input data, and only use columns corresponding to nonzero predictor scales in new data. This check has not yet been built in for snipls or rm separately.
Plus some minor changes to make it consistent with the latest numpy and matplotlib versions.
The preprocesing routine robcent has been refactored. Functionality has been
added to centre the data nonparametrically by the L1 median. The ancillary functions
for robcent have been moved into _preproc_utilities.py.
Furthermore, sprm, snipls and rm have all three been modified such that
they accept matrix, array or data frame input for both X and y. Also, the option
to provide column names has been extended to automatic extraction from data frame
input, or direct input as list, array or pandas Index.
The license has been changed from GPL3 to MIT.
0.4.2. 'kstepLTS' location estimator included.
Pre-processing functions further refactored so as to be compatible with sklearn pipelines.
Class now named VersatileScaler; the old robcent name still works, but will be sunset.
Preprocessing files moved into separate folder. More preprocessing options. Examples moved into Jupyter notebook in separate examples section.
ppdire merges in
preprocessingwidely extendedplotfunctions adapted- documentation improved
sudirejoins inplotfunctions adapted- documentation provided for
dicomo - 1.0.2: link to
direpackpublication added - 1.0.3: fixed rare division by zero in
l1median - 1.0.4: unit tests included
- 1.0.5:
sudirenotebook adapted - 1.0.9: function to calculate the martingale difference divergence matrix (MDDM) added in
_dicomo_utils.py - 1.0.11: documentation updated to accommodate for go-live of readthedocs page
- 1.0.13: fixed bug in option to use
Ballinsudire. Adjusted readthedocs.
Updated to Python 3.10-3.12 standards and NumPy 2.0 compatibility.
CI/CD Updates:
- Updated GitHub Actions to latest versions (
actions/checkout@v4,setup-miniconda@v3) - Updated Python test matrix from 3.8-3.10 to 3.9-3.12
- Fixed
setup.pyto read version without importing package (avoids dependency issues during install)
NumPy 2.0 Compatibility:
- Replaced deprecated
np.matrixwithnp.asarraythroughout codebase and notebooks - Fixed
np.product→np.prod(removed in NumPy 2.0) - Fixed
np.asfarray→np.asarray(removed in NumPy 2.0) - Fixed
float()conversion on non-0D arrays using.item()or proper indexing - Fixed matrix multiplication in
ppdire.transform()usingnp.dot()instead of*operator
Python 3.12 Compatibility:
- Fixed deprecated
assertAlmostEquals→assertAlmostEqualin test files
cyipopt/IPOPT Changes:
- Made
cyipoptan optional dependency: standard install withpip install direpack, full install withpip install direpack[ipopt] - Fixed cyipopt API changes:
cyipopt.problem→cyipopt.Problem,addOption→add_option sudiremodule only available when cyipopt is installed- Added
IPOPT_AVAILABLEflag to check availability at runtime
Bug Fixes:
- Fixed
sprm_plot_cv.eta_ncomp_contour()to handle NaN values in cross-validation results - Fixed sklearn
PLSRegression.coef_transposition in example notebooks (API changed in sklearn 1.3) - Fixed edge cases in
_sudire_utils.pyfor slices with ≤1 sample
Documentation:
- Updated README with two installation options (standard and full with ipopt)
- Updated example notebooks (
dicomo_example.ipynb,ppdire_example.ipynb) for NumPy 2.0 compatibility