Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python wrapper for the Vowpal Wabbit machine learning library.
Python
branch: master

Merge pull request #2 from thejat/master

Change --regularization flag to --l2 to be compatible with vw 7.3; added...
latest commit 51c525cf69
@shilad authored
Failed to load latest commit information.
.gitignore Change --regularization flag to --l2 to be compatible with vw 7.3; ad…
README
test_examples.py Change --regularization flag to --l2 to be compatible with vw 7.3; ad…
vowpal.py Change --regularization flag to --l2 to be compatible with vw 7.3; ad…

README

A python wrapper for the Vowpal Wabbit machine learning program.
More on Vowpal Wabbit at https://github.com/JohnLangford/vowpal_wabbit/wiki

Authored by Shilad Sen.

Distributed under the Apache Software Foundation License, version 2: http://www.apache.org/licenses/LICENSE-2.0

You can find code examples in test_examples.py.
1. Edit PATH_VW to direct to the executable binary vw
2. Run python ./test_examples.py

Common Issues:
Works with vw 7.3. Depending on the version, the parameters (like --l2 for l2 regularization) may change change.

Requires:
- Python >= 2.4 (for the subprocess module and deque).
- The vw executable (from the main VW website).

Basic usage of the module:
- Create VowpalExample objects for both the training and test set.
- Create a new Vowpal object and pass the records to the predict method.
- Receive predictions as a return value.

There are three ways to specify input examples:
- A list of VowpalExample objects. The entire dataset must fit in memory.
- An ExampleStream object. You can write VowpalExample objects to it, and they do not need to fit in memory. All training examples must appear before testing examples.
- A file in the correct input format. All training examples must appear before testing examples.


CHANGELOG:
- Added methods to support streaming of input examples.

TODO:
- Support streaming of prediction results so that they don't need to fit in memory.
Something went wrong with that request. Please try again.