tbjohns / BlitzML

BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

BlitzML

BlitzML is a fast, easy-to-use solver for training some popular linear machine learning models. Currently BlitzML trains:

You can use BlitzML as a Python package or C library. BlitzML uses minimal memory copying, making it convenient to incorporate as a subproblem solver in more ellaborate algorithms.

Problems that BlitzML solves

BlitzML trains sparse models by solving the problem

Here are the available loss functions:

Problem                   Loss function
Lasso
Sparse logistic regression
Sparse Huber
Sparse smoothed hinge
Sparse squared hinge

Use with Python

To install, clone the repository and run pip install . inside the project directory.

Sparse logistic regression example:

import blitzml
problem = blitzml.SparseLogisticRegressionProblem(A, b)
solution = problem.solve(l1_penalty=1.0)

A can be a dense NumPy array or sparse SciPy matrix.

Linear SVM example:

problem = blitzml.LinearSVMProblem(A, b)
solution = problem.solve(l2_penalty=1.0)

For detailed documentation, see https://tbjohns.github.io/BlitzML/.