Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esheldon/weighting
Derive weights so that the distributions of two populations are proportional in N-dimensional space
https://github.com/esheldon/weighting
Last synced: 3 days ago
JSON representation
Derive weights so that the distributions of two populations are proportional in N-dimensional space
- Host: GitHub
- URL: https://github.com/esheldon/weighting
- Owner: esheldon
- Created: 2015-06-20T13:41:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-28T18:46:09.000Z (over 7 years ago)
- Last Synced: 2024-10-19T21:21:06.414Z (19 days ago)
- Language: C
- Homepage:
- Size: 201 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# weighting
Derive weights so that the distributions of two populations are proportional in N-dimensional spaceThis is a pure C code based on the original C++ code by Carlos Cunha;
significant parts of the code are essentially unchanged. A python wrapper is
provided# python code
Currently the python code just calls out to the C code. I plan to make a proper
C extension in the futureFor an example, see the test code weighting.test_gaussians()
## Installing python code
```bash
python setup.py install --prefix=/some/path
python setup.py install --prefix=~/local# The python code calls out to the C code, so make
# sure the executable is in your path
```# C code
## compilation
Currently codes for different number of dimensions are compiled separately. The following
make different executables```bash
# makes calcweights5
make ndim=5# makes calcweights1. Make sure to clean first
make clean
make ndim=1# installation
make clean
make ndim=2 install
make clean
make ndim=5 install prefix=~/local# uninstall
make ndim=5 uninstall prefix=~/local
```