Alternating Conditional Expectation Algorithm
Project description
This project provides a wrapper program of Python for ACE algorithm implementation of Fortran.
Install Binary Distribution
Currently, only 64-bit binary distribution is provided. Run pip install ace_cream to install the binary distribution.
Platform |
py3.6 |
py3.7 |
py2.7 |
---|---|---|---|
Windows |
T |
T |
T |
MacOS |
T |
T |
|
Linux |
T |
T |
T |
How to build
You need numpy and fortran compiler to build from source.
Windows
Install Visual C++ toolchain.
Download MinGW-w64 from sourceforge, which provides the necessary fortran compiler
Install MinGW-w64 and add {install_dir}\mingw64\bin path to environment variable (make gfortran accessible from command line).
(for conda environment) Add {install_dir}\Anaconda3\Scripts to environment variable (make f2py accessible from command line).
Mac
You can use package manager to install gfortran (included within gnu compiler collection). For example, with Homebrew you can use
brew install gcc
Ubuntu
To install gfortran, use the default package manager:
sudo apt-get install gfortran
Run python setup.py install from command line at the project root directory.
How to use
import numpy as np
from ace_cream import ace_cream
# discrete case, binary symmetric channel with crossover probability 0.1
x = np.random.choice([0,1], size=N_SIZE)
n = np.random.choice([0,1], size=N_SIZE, p=[0.9, 0.1])
y = np.mod(x + n, 2)
# set both x(cat=0) and y(cat=-1) as categorical type
tx, ty = ace_cream(x, y, cat=[-1,0])
# continuous case
x = np.random.uniform(0, np.pi, 200)
y = np.exp(np.sin(x)+np.random.normal(size=200)/2)
tx, ty = ace_cream(x, y)
Result
change log
v0.1 initial commit
v0.2 modify to relative import in __init__.py
v0.3 add support for multiple columns of x and other directions of transformation
v0.4 add f_mapping function and unittests for this function
License
Apache License Version 2.0
Reference
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
File details
Details for the file ace_cream-0.4.post11.tar.gz
.
File metadata
- Download URL: ace_cream-0.4.post11.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc586a1b5f6ef63158e2948221f1154538f441b189ecc88f18852cf54d7dd01 |
|
MD5 | f3617997c88acd5129e1cd989ed08ea5 |
|
BLAKE2b-256 | 07998354f910fe69c182f2f9ce084c3941c532090982fcdfbb4b9edda6643b7a |
File details
Details for the file ace_cream-0.4.post11-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 417.7 kB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a8559d7110b1212bd7753152f29a9ac491d761697e6c0aa5dd6ff23c85ffc87 |
|
MD5 | b2a1221d62e17812b58d55271ea1c4cb |
|
BLAKE2b-256 | 5d9511872d21f5629c4d3053928eb0ee45369fd360457b52eecf2d339d1e021a |
File details
Details for the file ace_cream-0.4.post11-cp37-cp37m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 116.0 kB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e6febb8704d7811e20121ddebab75a68a9040bea0d5e58829ce9b380ed4cc35 |
|
MD5 | 9e998a814b091f02a45fcf4ef38268f2 |
|
BLAKE2b-256 | e603dd9b5c058bfbab20776799b84a2da4a0b66895eaf475273bf2e3ebe52d62 |
File details
Details for the file ace_cream-0.4.post11-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 417.6 kB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 565f18d276cdfaf03a58516d80a5ff14096335ea5c9af441c3b881d5c18e5776 |
|
MD5 | 8e03991aa32c970827b2c0b850173197 |
|
BLAKE2b-256 | 196f3eeefb6a214e799b1ab7f1ca4d7c953431f597ba02fd592a5816aac62853 |
File details
Details for the file ace_cream-0.4.post11-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 418.3 kB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31e3893b58c7f0885471c707ba9901e37b217d5587dc0c55ce0c262d45847f9a |
|
MD5 | 887b29dd43aaffab5d3a20fb51f6e45b |
|
BLAKE2b-256 | 513e3e58f50e89e26249da379b3355bcb5df8fe59f443a424959dea249888151 |
File details
Details for the file ace_cream-0.4.post11-cp34-cp34m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 418.2 kB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b3583880859ddb8f065040b4884d2a0456572e381551f0bb14f04e477aea032 |
|
MD5 | 47a0673b6271357f3b09ccbc7e62c3bd |
|
BLAKE2b-256 | 0293e386525980513fe0c0c097d4473074a6b67d8c8228d02337da283a2b9548 |
File details
Details for the file ace_cream-0.4.post11-cp27-cp27mu-manylinux1_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp27-cp27mu-manylinux1_x86_64.whl
- Upload date:
- Size: 416.3 kB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55bbec09b6e94833c19442d74c23e40ee9ec316096f598c6fd44057ae826d3ba |
|
MD5 | 6f2daf0bb136a96dafe42d3b4cddfe8a |
|
BLAKE2b-256 | b04bd81e1252c6e4202c2f6bdcf0e97fa75df77957024b9b3e5c1c98dad2c019 |
File details
Details for the file ace_cream-0.4.post11-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 114.9 kB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a133901b86f496d2c473e1eea6a82bb31be865bf1f5fc8731e23aa2a420b2c66 |
|
MD5 | e7eba1dcd3c700e78718159e294a540a |
|
BLAKE2b-256 | 2d3aaefa01dad14683d787d09240cf8c4b306c5940a6a5638969b99b49cfce89 |
File details
Details for the file ace_cream-0.4.post11-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 416.3 kB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/38.2.4 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5408b6e94a4b6460f5d58a4bb47759fe8fe3fde15f5c40fd482baf0a42858ef9 |
|
MD5 | 5ca6723b571c9c49048560fdd703833e |
|
BLAKE2b-256 | 2a51a2da608d4b9d40b61386aa423ccdb40aa58ef7c590564159c354ccd76449 |
File details
Details for the file ace_cream-0.4.post11-cp27-cp27m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: ace_cream-0.4.post11-cp27-cp27m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 114.6 kB
- Tags: CPython 2.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0edc34e7b930967dfc230c8c6d0aa210f9d1800836b2d7edc7c9565e785f7760 |
|
MD5 | 2f0734323df2fbf2c552e75dde9ccbe0 |
|
BLAKE2b-256 | d668495212d5c2437f98c45c23e9cd973b0e789f567d2cf80e0df7a6c8afdcab |