dselivanov / BlitzML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BlitzML

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

  • Sparse models with L1 regularization (Lasso-type problems).

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/.

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 87.5%Language:Python 10.3%Language:R 2.1%Language:Makefile 0.1%Language:Shell 0.0%