MiniBoosts
A collection of boosting algorithms written in Rust 🦀.

Some boosting algorithms use Gurobi optimizer,
so you must acquire a license to use this library.
If you have the license, you can use these boosting algorithms (boosters)
by specifying features = ["extended"] in Cargo.toml.
Note!
If you are trying to use the extended feature without a Gurobi license,
the compilation fails.
Features
Currently, I implemented the following Boosters and Weak Learners.
If you invent a new boosting algorithm,
you can introduce it by implementing Booster trait.
See cargo doc --open for details.
Boosters
BOOSTER |
FEATURE FLAG |
|---|---|
| AdaBoostby Freund and Schapire, 1997 | |
| AdaBoostVby Rätsch and Warmuth, 2005 | |
| SmoothBoostby Rocco A. Servedio, 2003 | |
| TotalBoostby Warmuth, Liao, and Rätsch, 2006 | extended |
| LPBoostby Demiriz, Bennett, and Shawe-Taylor, 2002 | extended |
| SoftBoostby Warmuth, Glocer, and Rätsch, 2007 | extended |
| ERLPBoostby Warmuth and Glocer, and Vishwanathan, 2008 | extended |
| CERLPBoost (Corrective ERLPBoost)by Shalev-Shwartz and Singer, 2010 | extended |
| MLPBoostby Mitsuboshi, Hatano, and Takimoto, 2022 | extended |
| GBM (Gradient Boosting Machine),by Jerome H. Friedman |
Weak Learners
WEAK LEARNERS |
|---|
| DTree (Decision Tree) |
| RTree (Regression Tree) |
Future work
-
Boosters
-
Weak Learners
- Bag of words
- TF-IDF
- Two-Layer Neural Network
- RBF-Net
-
Others
- Parallelization
- LP/QP solver (This work allows you to use
extendedfeatures without a license).
How to use
You can see the document by cargo doc --open command.
You need to write the following line to Cargo.toml.
= { = "https://github.com/rmitsuboshi/miniboosts" }
If you want to use extended features, such as LPBoost, specify the option:
= { = "https://github.com/rmitsuboshi/miniboosts", = ["extended"] }
Here is a sample code:
use *;
If you use boosting for soft margin optimization, initialize booster like this:
let n_sample = sample.shape.0;
let nu = n_sample as f64 * 0.2;
let lpboost = init
.tolerance
.nu; // Setting the capping parameter.
Note that the capping parameter must satisfies 1 <= nu && nu <= n_sample.
Research feature
When you invent a new boosting algorithm and write a paper, you need to compare it to previous works to show the effectiveness of your one. One way to compare the algorithms is to plot the curve for objective value or train/test loss. This crate can output a CSV file for such values in each step.
Here is an example:
use *;
use Logger;
use SoftMarginObjective;
// Define a loss function
Further, one can log your algorithm by implementing Research trait.
Run cargo doc --open to see more information.