{ "info": { "author": "Scott Graham", "author_email": "scott.d.graham@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "Vowpal Wabbit Python Wrapper\n============================\n\n.. image:: https://badge.fury.io/py/vowpalwabbit.svg\n :alt: PyPI Package\n :target: https://pypi.python.org/pypi/vowpalwabbit\n.. image:: https://travis-ci.org/JohnLangford/vowpal_wabbit.png\n :alt: Build Status\n :target: https://travis-ci.org/JohnLangford/vowpal_wabbit\n.. image:: https://ci.appveyor.com/api/projects/status/github/JohnLangford/vowpal_wabbit?branch=master&svg=true\n :alt: Windows Build Status\n :target: https://ci.appveyor.com/project/JohnLangford/vowpal-wabbit\n.. image:: https://coveralls.io/repos/github/JohnLangford/vowpal_wabbit/badge.svg\n :alt: Coverage\n :target: https://coveralls.io/r/JohnLangford/vowpal_wabbit\n\nVowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project.\n\nInstalling this package builds Vowpal Wabbit locally for explicit use within python, it will not create the command-line version\nof the tool (or affect any previously existing command-line installations).\nTo install the command-line version see the main project page: https://github.com/JohnLangford/vowpal_wabbit\n\nThe version of the PyPI vowpalwabbit package corresponds to the tagged version of the code in the github repo that will be used\nduring building and installation.\nIf you need to make local changes to the code and rebuild the python binding be sure to pip uninstall vowpalwabbit then rebuild\nusing the local repo installation instructions below.\n\nInstallation\n------------\n\nFrom PyPI:\n\n.. code-block:: bash\n\n $ pip install vowpalwabbit\n\nFrom local repo (useful when making modifications):\n\n.. code-block::\n\n $ cd python\n $ pip install -e .\n\nUsage\n-----\n\nYou can use the python wrapper directly like this:\n\n.. code-block:: python\n\n >>> from vowpalwabbit import pyvw\n >>> vw = pyvw.vw(quiet=True)\n >>> ex = vw.example('1 | a b c')\n >>> vw.learn(ex)\n >>> vw.predict(ex)\n\nOr you can use the included scikit-learn interface like this:\n\n.. code-block:: python\n\n >>> import numpy as np\n >>> from sklearn import datasets\n >>> from sklearn.model_selection import train_test_split\n >>> from vowpalwabbit.sklearn_vw import VWClassifier\n >>>\n >>> # generate some data\n >>> X, y = datasets.make_hastie_10_2(n_samples=10000, random_state=1)\n >>> X = X.astype(np.float32)\n >>>\n >>> # split train and test set\n >>> X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=256)\n >>>\n >>> # build model\n >>> model = VWClassifier()\n >>> model.fit(X_train, y_train)\n >>>\n >>> # predict model\n >>> y_pred = model.predict(X_test)\n >>>\n >>> # evaluate model\n >>> model.score(X_train, y_train)\n >>> model.score(X_test, y_test)\n\nTroubleshooting\n---------------\n\nSome common causes of failure for installation are due to missing or mis-matched dependencies when Vowpal Wabbit builds.\nMake sure you have boost and boost-python installed on your system.\n\nFor Ubuntu/Debian/Mint\n\n.. code-block:: bash\n\n $ apt-get install libboost-program-options-dev zlib1g-dev libboost-python-dev\n\nFor Mac OSX\n\n.. code-block:: bash\n\n $ brew install libtool autoconf automake\n $ brew install boost\n $ brew install boost-python\n # or for python3 (you may have to uninstall boost and reinstall to build python3 libs)\n $ brew install boost-python --with-python3\n\nAlso, having Anaconda in your path can cause segmentation faults when importing the pyvw module. Providing Conda support\nis an open issue and efforts are welcome, but in the meantime it is suggested to remove any conda bin directory from your path\nprior to installing the vowpalwabbit package.\n\nDevelopment\n-----------\n\nContributions are welcome for improving the python wrapper to Vowpal Wabbit.\n\n1. Check for open issues_ or create one to discuss a feature idea or bug.\n2. Fork the repo_ on Github and make changes to the master branch (or a new branch off of master).\n3. Write a test in the python/tests folder showing the bug was fixed or feature works (recommend using pytest_).\n4. Make sure package installs and tests pass under all supported environments (this calls tox_ automatically).\n5. Send the pull request.\n\nTests can be run using setup.py:\n\n.. code-block:: bash\n\n $ python setup.py test\n\n\nDirectory Structure:\n\n* python : this is where the c++ extension lives\n* python/vowpalwabbit : this is then main directory for python wrapper code and utilities\n* python/examples : example python code and jupyter notebooks to demonstrate functionality\n* python/tests : contains all tests for python code\n\n**Note:** neither examples nor tests directories are included in the distributed package, they are only for development purposes.\n\n**Tips**\n\n* python setup.py develop\n* python setup.py build\n* python setup.py install\n* pip install dist/vowpalwabbit-8.5.0.tar.gz\n* Documentation\n** https://docs.python.org/3/distutils/apiref.html#distutils.core.Extension\n** https://docs.python.org/3/distutils/setupscript.html\n\n.. _issues: https://github.com/JohnLangford/vowpal_wabbit/issues\n.. _repo: https://github.com/JohnLangford/vowpal_wabbit\n.. _pytest: http://pytest.org/latest/getting-started.html\n.. _tox: https://tox.readthedocs.io/en/latest/index.html", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JohnLangford/vowpal_wabbit", "keywords": "fast machine learning online classification regression", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "vowpalwabbitds", "package_url": "https://pypi.org/project/vowpalwabbitds/", "platform": "any", "project_url": "https://pypi.org/project/vowpalwabbitds/", "project_urls": { "Homepage": "https://github.com/JohnLangford/vowpal_wabbit" }, "release_url": "https://pypi.org/project/vowpalwabbitds/8.5.0/", "requires_dist": null, "requires_python": "", "summary": "Vowpal Wabbit Python package", "version": "8.5.0" }, "last_serial": 3471328, "releases": { "8.5.0": [ { "comment_text": "", "digests": { "md5": "a3428ac40f04658968ac32ae447b87cd", "sha256": "cc6f6be7cdb15a2eb77354b0e961d69fe8d6a0364d18c57136386bb7e1443a38" }, "downloads": -1, "filename": "vowpalwabbitds-8.5.0.tar.gz", "has_sig": false, "md5_digest": "a3428ac40f04658968ac32ae447b87cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 912297, "upload_time": "2018-01-08T15:13:50", "url": "https://files.pythonhosted.org/packages/8c/4e/99993b56233de82f39c018cd99a1a12bfcbe96aa1ea5b2090126617460d1/vowpalwabbitds-8.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a3428ac40f04658968ac32ae447b87cd", "sha256": "cc6f6be7cdb15a2eb77354b0e961d69fe8d6a0364d18c57136386bb7e1443a38" }, "downloads": -1, "filename": "vowpalwabbitds-8.5.0.tar.gz", "has_sig": false, "md5_digest": "a3428ac40f04658968ac32ae447b87cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 912297, "upload_time": "2018-01-08T15:13:50", "url": "https://files.pythonhosted.org/packages/8c/4e/99993b56233de82f39c018cd99a1a12bfcbe96aa1ea5b2090126617460d1/vowpalwabbitds-8.5.0.tar.gz" } ] }