Skip to main content

Implements several boosting algorithms in Python

Project description

KTBoost

This Python package implements several boosting algorithms with different combinations of base learners, optimization algorithms, and loss functions.

Concerning base learners, this includes:

  • Trees
  • Kernel Ridge regression
  • A combination of the two (i.e., the KTBoost algorithm)

Concerning the optimization step for finding the boosting updates, the package supports:

  • Gradient descent
  • Newton-Rahson method
  • A hybrid version of the two for trees as base learners

The package implements the following loss functions:

  • Continuous data (regression): quadratic loss (L2 loss), absolute error (L1 loss), Huber loss, quantile regression loss, Gamma regression loss, negative Gaussian likelihood with both the mean and the standard deviation as functions of features
  • Count data (regression): Poisson regression loss
  • (Unorderd) Categorical data (classification): logistic regression loss (log loss), exponential loss, cross entropy loss with softmax
  • Mixed continuous-categorical data (censored regression): negative Tobit likelihood (i.e., the Grabit model)

The package re-uses code from scikit-learn and its workflow is very similar to that of scikit-learn.

It can be installed using pip install KTBoost and then loaded using import KTBoost.KTBoost as KTBoost. The two main classes are KTBoost.BoostingClassifier and KTBoost.BoostingRegressor.

The following code example defines a model, trains it, and makes predictions.

import KTBoost.KTBoost as KTBoost
model = KTBoost.BoostingRegressor(loss="ls",base_learner="tree")
model.fit(Xtrain,ytrain)
model.predict(Xpred)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

KTBoost-0.0.6.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

KTBoost-0.0.6-py2-none-any.whl (50.7 kB view details)

Uploaded Python 2

File details

Details for the file KTBoost-0.0.6.tar.gz.

File metadata

  • Download URL: KTBoost-0.0.6.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for KTBoost-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e568a9567b181065f0ce8726a954ba229c53e4704a273275567fd47b629e41ac
MD5 817029e48f4a5a0ccdf5698a41f08fe4
BLAKE2b-256 1946d4a5bcaf49168781a26341500ffd6424b94fdd03d351fa4ac5fcaf7b905a

See more details on using hashes here.

File details

Details for the file KTBoost-0.0.6-py2-none-any.whl.

File metadata

  • Download URL: KTBoost-0.0.6-py2-none-any.whl
  • Upload date:
  • Size: 50.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.14

File hashes

Hashes for KTBoost-0.0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 edff9e8c76c894f7d3c5c52aeef5e9ae9a7bdacfcb4a758d2fb422a7946325a9
MD5 3b1b65aa3929a8fb9efdbb8310248012
BLAKE2b-256 4aedd1e0d8bc41990db3a26c139f832d808f58b38b296bf4194eb59845ac0a6b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page