Skip to content

Releases: Techtonique/mlsauce

v0.22.3

06 Oct 04:28
Compare
Choose a tag to compare

Generalize LSBoost gradient boosting to any base learner (alert: high performance)

See: https://thierrymoudiki.github.io/blog/2024/10/06/python/r/genericboosting
and examples directory examples/genboost*

Example:

import os 
import mlsauce as ms 
from sklearn.datasets import load_breast_cancer, load_iris, load_wine, load_digits
from sklearn.model_selection import train_test_split
from time import time

load_models = [load_breast_cancer, load_iris, load_wine]

for model in load_models: 

    data = model()
    X = data.data
    y= data.target

    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = .2, random_state = 13)

    clf = ms.LazyBoostingClassifier(verbose=0, ignore_warnings=True, 
                                    custom_metric=None, preprocess=False)

    start = time()
    models, predictioms = clf.fit(X_train, X_test, y_train, y_test)
    print(f"\nElapsed: {time() - start} seconds\n")

    print(models)

v0.19.1

06 May 07:23
Compare
Choose a tag to compare

version 0.19.1

  • [Technical] install Cython first (specify version)

version 0.18.4

  • Gaussian weights in LSBoostRegressor and LSBoostClassifier randomized hidden layer

version 0.17.0

  • add ElasticNetRegressor solver to LSBoostRegressor and LSBoostClassifier

version 0.16.0

  • add clustering to LSBoostRegressor, LSBoostClassifier, and AdaOpt
  • add polynomial features to LSBoostRegressor, LSBoostClassifier

Also, more technical: remove distutils (deprecated) and use setuptools

v0.12.3

14 Apr 23:10
Compare
Choose a tag to compare

version 0.12.3

  • add prediction intervals to LSBoostRegressor (split conformal prediction,
    split conformal prediction with Kernel Density Estimation, and split
    conformal prediction bootstrap)
    see examples/lsboost_regressor_pi.py for examples
  • do not rescale columns with zero variance in LSBoostRegressor and LSBoostClassifier
  • faster ridge regression for LSBoostRegressor and LSBoostClassifier

v0.10.0

28 Jan 20:43
dc70991
Compare
Choose a tag to compare
  • Delete dependency with numpy.distutils and use setuptools' Extension instead.

v0.9.1

26 Dec 01:26
Compare
Choose a tag to compare

v0.8.11

19 Nov 06:24
Compare
Choose a tag to compare
  • install numpy before setup
  • stop using np.int
  • update Makefile
  • update examples
  • no more refs to openmp (for now)
  • update and align with R version
  • submit conda version

v0.8.10

02 Nov 11:07
Compare
Choose a tag to compare

remove dust:

  • install numpy before setup
  • stop using np.int
  • update Makefile
  • update examples
  • no more refs to openmp (for now)
  • update and align with R version
  • submit conda version
  1. Command line:
pip install mlsauce
  1. Python:
import mlsauce as ms
import numpy as np 
from sklearn.datasets import load_breast_cancer, load_wine, load_iris
from sklearn.model_selection import train_test_split
from time import time


# dataset 
breast_cancer = load_breast_cancer()
X = breast_cancer.data
y = breast_cancer.target

# split data into training test and test set
X_train, X_test, y_train, y_test = train_test_split(X, y, 
                                                    test_size=0.2)

# fit 
obj = ms.LSBoostClassifier(tolerance=1e-2)
print(obj.get_params())
start = time()
obj.fit(X_train, y_train)
print(time()-start)

# predict
start = time()
print(obj.score(X_test, y_test))
print(time()-start)