GithubHelp home page GithubHelp logo

blitzml's Introduction

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

blitzml's People

Contributors

tbjohns avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blitzml's Issues

r-package

Hi Tyler. I've started to work on R wrapper here. There several challenges so far:

  1. I'm getting too many arguments provided to function-like macro here dselivanov@master#diff-137530b9340672b840093302a73c2bf3L29. So I had to comment out assert statements.
  2. indices and pointers in sparse matrices in R are integers. In order to work with sparse matrices "in place" I had to re-define size_t and index_t to be uint32_t - dselivanov@master#diff-137530b9340672b840093302a73c2bf3R21.

Let me know what do you think whether such adjustments can be merged to master.

Also I found a bit confusing how Parameters are defined and passed from python code. Mb it worth to have a structure for that? construction of such small object shouldn't hurt performance.

ENH: package not installable in editable mode

Hi @tbjohns
pip install . works fine, but pip install -e . fails:

  Running setup.py develop for blitzml
    ERROR: Complete output from command /home/mathurin/anaconda3/bin/python -c 'import setuptools, tokenize;__file__='"'"'/home/mathurin/workspace/BlitzML/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps:
    ERROR: running develop
    running egg_info
    writing blitzml.egg-info/PKG-INFO
    writing dependency_links to blitzml.egg-info/dependency_links.txt
    writing top-level names to blitzml.egg-info/top_level.txt
    reading manifest file 'blitzml.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'blitzml.egg-info/SOURCES.txt'
    running build_ext
    error: can't copy 'build/lib.linux-x86_64-3.6/blitzml.libblitzml.so': doesn't exist or not a regular file
    ----------------------------------------

Is there an easy way to make this work ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.