liknorm 1.0.11
pip install liknorm==1.0.11
Newer version available (2.0.0)
Released:
Liknorm Python wrapper
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Danilo Horta
- Tags liknorm, integration
Classifiers
- Development Status
- License
- Operating System
- Programming Language
Project description
Liknorm Python wrapper.
Install
The recommended way of installing it is via conda
conda install -c conda-forge liknorm-py
An alternative way would be via pip. First you need to install liknorm library and then
pip install liknorm-py
Running the tests
After installation, you can test it
python -c "import liknorm; liknorm.test()"
as long as you have pytest.
Example
>>> from numpy import empty
>>> from numpy.random import RandomState
>>> from liknorm import LikNormMachine
>>>
>>> machine = LikNormMachine('bernoulli')
>>> random = RandomState(0)
>>> outcome = random.randint(0, 2, 5)
>>> tau = random.rand(5)
>>> eta = random.randn(5) * tau
>>>
>>> log_zeroth = empty(5)
>>> mean = empty(5)
>>> variance = empty(5)
>>>
>>> moments = {'log_zeroth': log_zeroth, 'mean': mean, 'variance': variance}
>>> machine.moments(outcome, eta, tau, moments)
>>>
>>> print('%.3f %.3f %.3f' % (log_zeroth[0], mean[0], variance[0]))
-0.671 -0.515 0.946
Authors
License
This project is licensed under the MIT License - see the license file for details.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Danilo Horta
- Tags liknorm, integration
Classifiers
- Development Status
- License
- Operating System
- Programming Language
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
File details
Details for the file liknorm-1.0.11.tar.gz
.
File metadata
- Download URL: liknorm-1.0.11.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e844e1a90e95ebcce2d7de783a09ffc4e9e78239ef391fed6b37218f77078b96 |
|
MD5 | fba4e693c1a2fd92d3083235ca6635d7 |
|
BLAKE2b-256 | 8e9fbf0cfbb37d23024020f6aa81d9bb979243e2739a5ef9e32bc33249c8c279 |