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 .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wide-product-0.1.1.tar.gz.
File metadata
- Download URL: wide-product-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d1af4e7b24ea0c1db620314cd488f0fd1c959db4095a03a635ffec9d482ab3
|
|
| MD5 |
9cd832355f2c1cf9d655fc02c4e81b43
|
|
| BLAKE2b-256 |
dca5eaab255b23509293fa5a69847195b87e7fc5e9e93606b6aad8766311c253
|
File details
Details for the file wide_product-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8535a4b3d3f69b58212c7a2abce7730eaeb2934319496f58c1a992a4b925082
|
|
| MD5 |
9c8b79413e33a8910ddd8b78c00cd821
|
|
| BLAKE2b-256 |
711e1c5b12cb2f823e179abecd52653570f52515455b17382aaed1258b51417e
|
File details
Details for the file wide_product-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.2 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a30c925b17e28c8b3376f108e8cd6a54dfe7f32c3b1e0efd7ad02475b2ef0c6
|
|
| MD5 |
faa45e571913b9ca6a0ed7385f57e4fa
|
|
| BLAKE2b-256 |
0ead560d9af8448acadd1ada9e80d0367c9d5c21a9b84654bad1d1b9568914e6
|
File details
Details for the file wide_product-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.2 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8ad3b4b8de73c4c2c9713cd97b5780c7fec3df8ebca3f0a933480ac674e6be
|
|
| MD5 |
30722decfd5f9f1540ee85a9ff0a8d4e
|
|
| BLAKE2b-256 |
951a4896a27609567b4d950ce09c7ca79f646a45dd63e007d53f3846e9b2a72e
|
File details
Details for the file wide_product-0.1.1-cp311-cp311-macosx_10_9_universal2.whl.
File metadata
- Download URL: wide_product-0.1.1-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 16.4 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58718d429e49be9002e3eb4d41153acf6f71ba39a3aa3b0b1c17101520105450
|
|
| MD5 |
8c82b2c569fbdfac15761d15c51b5cdf
|
|
| BLAKE2b-256 |
af41a23af8aa54f3191a20faf102e89a1fd7bfe6a612262b35c6670f8b41cbad
|
File details
Details for the file wide_product-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76cdff06d6c306a2db33b080b88ea6fe637ad0e2af9eb955c81d8d43322d4871
|
|
| MD5 |
e1bd4d9c77363aa9516788b9b84b926c
|
|
| BLAKE2b-256 |
cfbab87ed84bcd0ae4e3b19ab9ad9de7836363f89de5b0d2d6fd3beae9fbd777
|
File details
Details for the file wide_product-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4535e4ca33ac5922d20db7b1c43a168827767578a4e573d2b453e0c3b2f0fe3
|
|
| MD5 |
85ff6282fb213bd55803adc1aefe9fba
|
|
| BLAKE2b-256 |
5793c8033a39c9155dc173767f3edc1d8f11246a51f8cc6222f579737048bc67
|
File details
Details for the file wide_product-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.2 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e1ba60d5cf5949ebe22904c39f96077ed0962a37df2c0f2feed685c551543e2
|
|
| MD5 |
ef0edaeab7d1d081fe2aa55980a997e9
|
|
| BLAKE2b-256 |
42230fff2c9222f27754599a71cca0bc9ec925374722a06d3701ad4bc79fe0bb
|
File details
Details for the file wide_product-0.1.1-cp310-cp310-macosx_10_9_universal2.whl.
File metadata
- Download URL: wide_product-0.1.1-cp310-cp310-macosx_10_9_universal2.whl
- Upload date:
- Size: 16.4 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bad07807094dd7bb33ef7d7f0bf9c850207d6afaa47c215e15a1a7661bae7532
|
|
| MD5 |
d86fe639253ee416ff7dcf99625a490c
|
|
| BLAKE2b-256 |
8d258eb1797d67789dd3aa10016dda8d726add5928873287c4a32c3ceab5e3ea
|
File details
Details for the file wide_product-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f57183459f21478a4472f12339e54d50da696aa315680e7b0518b0f89ed14d69
|
|
| MD5 |
88a81fdb39dd4af333223608ee12bf44
|
|
| BLAKE2b-256 |
e58c12310902ca06dfbdeec80bf76586dba4b5d1e0f5ac9df59dc7bc59531db5
|
File details
Details for the file wide_product-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.2 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
335f9c864cfb07aaacbfcdbf425737f64beec96fe665a69fd86e8b30bccedc75
|
|
| MD5 |
4d15ae76570d4516e33c01a3d59c14c2
|
|
| BLAKE2b-256 |
9bde0507059164208ffa883f50366b214fcdd13af9b3b3240a965beccff1478d
|
File details
Details for the file wide_product-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.2 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504f615a49dc1180f6a706e09f12f6210300e23920e8d1d1a41c4e20495f76ab
|
|
| MD5 |
5034534c3b222a496f3d51edfbc33ee4
|
|
| BLAKE2b-256 |
d5c032432c6866f595ff1588a128dd751835970ce74dbf39c51092e768cafca9
|
File details
Details for the file wide_product-0.1.1-cp39-cp39-macosx_10_9_universal2.whl.
File metadata
- Download URL: wide_product-0.1.1-cp39-cp39-macosx_10_9_universal2.whl
- Upload date:
- Size: 16.4 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2b507f882d09b4dced03cfe11b4ba1d36828f2b83bed5c07416903244ed52bb
|
|
| MD5 |
ad020c6321965b094f8a8c8f533303d8
|
|
| BLAKE2b-256 |
856ac7fc5bb128b20f0c1add2d819cb6bd9198c7a57848bc08bf2127ed3268ab
|
File details
Details for the file wide_product-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
565f1da64a74969d30742eb3473c797631b79a9f15de1fc7ad165de453e888d1
|
|
| MD5 |
c2ac2a9a988ebcb92d46e4aaf8ccbc66
|
|
| BLAKE2b-256 |
11da04b588cf0992a01c59164dca88c6e800f1fb6085b15954c47f7e54ab50f4
|
File details
Details for the file wide_product-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.3 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2991cf3420689017f56a62217b77dc3c4a3ab1615408423e2c184bcde093b6e4
|
|
| MD5 |
d2cc5b6dc3aada1dc9311b176c3ca097
|
|
| BLAKE2b-256 |
a4a5f64a074a40d7c5ec99735535f2f7bab7da03806b97150979e43739905770
|
File details
Details for the file wide_product-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.2 kB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3da676353eabf1ebfd57c63dabcb8a657528d18d5b442b32f6ccb30a39d1e54c
|
|
| MD5 |
9046cd77358e8c762d5704c44cc6fc15
|
|
| BLAKE2b-256 |
5622400151a689ca7412e405d85076b581995242debf968f984d3e322d3ee72b
|
File details
Details for the file wide_product-0.1.1-cp38-cp38-macosx_10_9_universal2.whl.
File metadata
- Download URL: wide_product-0.1.1-cp38-cp38-macosx_10_9_universal2.whl
- Upload date:
- Size: 16.4 kB
- Tags: CPython 3.8, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26741d4f57a4a2725546be86613047561da77424cf112877109fc424d3dd696
|
|
| MD5 |
5e3303f388fc28a0c357e58c49678fd9
|
|
| BLAKE2b-256 |
7a6752a46160ee6cd356b433232abc2db77fe6051cd82ff9cd576bca32e6e9e0
|
File details
Details for the file wide_product-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60310cbd615a8df37ce1849532ee9edb061011ca52d19440a1552dd258dfaea
|
|
| MD5 |
539d9a96cec8ccd2348868383d75c6c5
|
|
| BLAKE2b-256 |
b08e06e281b75c983835124476b98be7692150a20747dc5eaf581b956efb5105
|
File details
Details for the file wide_product-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 20.1 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b5d61af47dc1210caafc70f64a9f461adedc34a98eb44603b80e9a4e397952
|
|
| MD5 |
5997a576168801c39c88966306187689
|
|
| BLAKE2b-256 |
8ca6cc3fbd271d8e438eabadd16449b069f2d8c2393d2964c9a111d94dcd655c
|
File details
Details for the file wide_product-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl.
File metadata
- Download URL: wide_product-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.1 kB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36769acd24e2ddacde109a364e08ad3741169d5e2317e69fd820efb1fe728422
|
|
| MD5 |
27d727d5b98bdc5c1835bb516cd1ca4d
|
|
| BLAKE2b-256 |
bd852004eb378dfe57a2e78b9616560e535fc1a4f8ae6c913b21826d6232e134
|