Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Wide (partial Khatri-Rao) sparse matrix product

Project Description

wide-product implements a partial, column-wise Khatri-Rao product. It is fast, and works on sparse matrices.

It can be useful for engineering of cross-features for machine learning.

Definition

For a pair of scalars (~ one by one matrices), the wide product is multiplication:

wide_product ( [[a]], [[b]] ) == [[a * b]]

Where matrices are constructed by vertical stacking, the product is row-wise:

wide_product ( vstack((A, B)), vstack((C, D)) ) ==
    vstack((wide_product(A, C),
            wide_product(B, D)))

Where matrices are constructed by horizontal stacking, the product contains all the products of the subcomponents up to permutation of columns:

wide_product ( hstack((A, B)), hstack((C, D)) ) ==
    hstack((wide_product(A, C),
            wide_product(A, D),
            wide_product(B, C),
            wide_product(B, D)))

Installation

pip install wide-product

Development

To build the module:

python setup.py build

To test:

PYTHONPATH=$(echo build/lib*):. py.test

To install:

pip install .
Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
wide-product-0.0.1.tar.gz (2.6 kB) Copy SHA256 Checksum SHA256 Source Apr 21, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting