Skip to content

Releases: ottenbreit-data-science/aplr

10.24.1

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 13 Aug 15:51

Fixed

  • Restored Safe Output Redirection in Python Fit Bindings: Fixed the regression in version 10.24.0 where the native fit bindings wrote C++ training output directly to stdout instead of redirecting it through Python. The fix restores a safe redirection guard so training output is captured correctly without bypassing the Python output stream.

10.24.0

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 12 Aug 16:27

Added

  • Python 3.15 Support: Added compatibility with Python 3.15.

Fixed

  • Corrected Hessian Usage and Hessian Calculations: Disabled Hessian-based updates for binomial loss and logit link models because the non-Hessian formulation is more predictive in those settings. Also corrected the underlying Hessian calculations for the remaining supported cases.
  • Resolved Segmentation Fault in Python Fit Bindings: Removed the pybind11 output-redirection guard from the native fit bindings because it caused a segmentation fault during training in the Python extension. As a result, C++ console output from the training process is emitted directly to the terminal instead of being captured/re-directed by Python.

Documentation

  • Updated Examples and Presentation: Examples and the presentation have been updated to mention penalty_for_non_linearity and penalty_for_interactions instead of num_first_steps_with_linear_effects_only and boosting_steps_before_interactions_are_allowed respectively.
  • API Reference: Updated the API reference with information on how to pass the custom function calculate_custom_differentiate2_predictions_wrt_linear_predictor_function (second order differentiation).

10.23.0

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 16 May 13:26

Added

  • Hessian-Based Optimization: Integrated second-order derivative information (Hessian) to accelerate convergence for models using non-MSE loss functions or non-identity link functions (e.g., logit, log). This improvement allows for more precise updates in each boosting step, often leading to better performance in fewer iterations.
  • Custom Hessian Support: Added the calculate_custom_hessian_function parameter to APLRRegressor. Users can now provide a custom function to compute the second-order derivative for their own loss functions, ensuring that custom objectives also benefit from faster convergence.

Deprecated

  • faster_convergence Parameter: The faster_convergence parameter in APLRRegressor is now deprecated. It is superseded by the more robust and mathematically sound Hessian-based optimization, which is now the standard method for accelerating convergence in relevant tasks.

10.22.1

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 25 Apr 20:03

[10.22.1] - 2026-04-25

Fixed

  • Preprocessing-Aware Fit Arguments: Fixed a bug where predictor-specific fit arguments were not correctly mapped to transformed columns when preprocess=True. The model now correctly handles cases where raw features are expanded into multiple columns due to one-hot encoding or the addition of missing value indicator flags. This ensures that constraints (e.g., monotonicity), prioritization, and custom penalties/learning rates are properly applied to the resulting features. For monotonicity, constraints are applied to the primary numeric feature but specifically excluded (set to 0) for generated dummy columns and missing value flags. Affected arguments include prioritized_predictors_indexes, monotonic_constraints, interaction_constraints, predictor_learning_rates, predictor_penalties_for_non_linearity, predictor_penalties_for_interactions, and predictor_min_observations_in_split.

10.22.0

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 24 Feb 17:28

Added

  • Sequential Tuning in APLRTuner: Introduced a new sequential_tuning boolean parameter to APLRTuner. When True, hyperparameters are tuned sequentially in the order they appear in the parameters dictionary, which can be significantly faster than a full grid search. This method avoids re-testing duplicate parameter combinations.

Changed

  • min_observations_in_split Parameter: The min_observations_in_split and predictor_min_observations_in_split parameters are now floats. The default for min_observations_in_split has been updated to 0.3. Values below 1.0 are interpreted as a power of the total number of training observations. For example, with 10,000 training observations, a value of 0.5 results in a minimum of ceil(10000**0.5) = 100 observations.

Fixed

  • APLRClassifier Type Handling: Fixed a TypeError in APLRClassifier that occurred when the target variable y was a pandas.Series of integers. The model now correctly handles this input by converting it to the expected string format. This also resolves issues when using APLRTuner for classification with a pandas.Series target.
  • APLRClassifier List Handling: Improved robustness when the target variable y is a list. Previously, only the first element was checked to determine if conversion to string was necessary. Now, the entire list is checked, ensuring that mixed-type lists or lists where the first element is a string but others are not are correctly converted to strings.
  • APLRTuner Type Hinting: Corrected the type hint for the parameters argument in APLRTuner to Dict[str, List[Any]], accurately reflecting that it accepts lists of various value types (e.g., floats, integers, and strings).

10.21.0

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 21 Feb 12:25

Added

  • validation_ratio Parameter: Added validation_ratio to the constructor of APLRRegressor and APLRClassifier. This parameter specifies the ratio of training observations used for validation. When specified, cv_folds is ignored. This is useful for speeding up hyperparameter tuning.

Documentation

  • Updated Examples: Examples have been updated to use validation_ratio for hyperparameter tuning by default, with an option to switch back to cross-validation.
  • API Reference: Updated documentation to reflect the new validation_ratio parameter.
  • README: Restructured the README to improve navigation. Added a dedicated "Documentation" section consolidating resources, examples, and API references. Added a "Citation" section for the published article.

10.20.1

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 17 Dec 19:43

Fixed

  • Backward Compatibility Regression: Fixed a regression introduced in version 10.20.0 that caused an AttributeError when loading models saved with older versions of APLR.

10.20.0

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 14 Dec 11:13

Breaking Changes

  • Model Compatibility: Due to the migration of the preprocessing engine from Python to C++, models saved with aplr versions 10.18.0 through 10.19.3 are not compatible with version 10.20.0 if they were trained on data that triggered the Python-based preprocessing (e.g., a pandas.DataFrame with categorical features or missing values). These older models may fail or produce unexpected results during prediction and must be retrained using version 10.20.0 or newer.

Changed

  • Preprocessing Engine: The entire data preprocessing pipeline, including missing value imputation and one-hot encoding, has been moved from Python to C++ for improved robustness. This change ensures that all data transformations are handled within the core engine.

Added

  • preprocess Parameter: A new boolean parameter preprocess has been added to the APLRRegressor and APLRClassifier constructors.
    • When True (default), the model automatically handles missing values and one-hot encodes categorical features in pandas.DataFrame inputs.
    • When False, automatic preprocessing is disabled. In this mode, the input X must be a purely numeric numpy.ndarray or pandas.DataFrame. This provides greater control for users who prefer to manage their own preprocessing pipelines and can result in performance gains and a lower memory footprint.

10.19.3

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 06 Dec 23:00

Fixed

  • Input Validation for X_names: Resolved a ValueError that occurred when a NumPy array was passed to the X_names parameter in the fit method. The input validation has been enhanced to gracefully handle any list-like iterable (including NumPy arrays and tuples), ensuring robust and predictable behavior when providing feature names for non-DataFrame inputs.

10.19.2

Choose a tag to compare

@mathias-von-ottenbreit mathias-von-ottenbreit released this 06 Dec 09:34

Fixed

  • Memory Optimization: Optimized the Python preprocessing pipeline to fix a bug that caused unnecessary memory consumption. A "just-in-time" copy mechanism now prevents large data copies during both fitting and prediction, improving memory safety for all input types.
  • Preprocessing Robustness: Addressed a RuntimeWarning: Mean of empty slice that occurred during median imputation in _preprocess_X_fit when a column contained only missing values. The median calculation now gracefully handles such cases.
  • Backward Compatibility: Improved __setstate__ to safely load older pickled models by initializing new preprocessing attributes to their correct default types (e.g., []), preventing TypeError exceptions.

Changed

  • Code Quality and Maintainability: The entire Python preprocessing pipeline was refactored into a clean fit/transform pattern. This separation of concerns removes boolean flags and significantly improves code clarity, making it easier to maintain and debug.
  • Type Hinting: Added comprehensive type hints to all preprocessing methods for better readability and to enable static analysis.

Documentation

  • Updated API references and changelog for improved clarity and accuracy regarding the automatic preprocessing of numpy.ndarray and pandas.DataFrame inputs.