madvn / infotheory Goto Github PK
View Code? Open in Web Editor NEWC++/Python Information theoretic analyses tools
Home Page: http://mcandadai.com/infotheory
License: MIT License
C++/Python Information theoretic analyses tools
Home Page: http://mcandadai.com/infotheory
License: MIT License
I have clone the repository.
When I run pip install infotheory I get the following errors:
Collecting infotheory
Using cached infotheory-1.0.01.tar.gz (19 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: infotheory
Building wheel for infotheory (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
C:\Users\a-v-d\anaconda3\envs\MasterThesis\lib\site-packages\setuptools\dist.py:314: InformationOnly: Normalizing '1.0.01' to '1.0.1'
self.metadata.version = self._normalize_version(self.metadata.version)
PyLinker.cpp
C:\Users\a-v-d\AppData\Local\Temp\pip-install-__062f80\infotheory_d9c2c9609954478b9b95cf02d1db283a\infotheory\InfoTools.h(71): warning C4244: 'argument': conversion from 'double' to 'EltType', possible loss of data
with
[
EltType=int
]
C:\Users\a-v-d\AppData\Local\Temp\pip-install-__062f80\infotheory_d9c2c9609954478b9b95cf02d1db283a\infotheory\InfoTools.h(79): warning C4244: 'argument': conversion from 'double' to 'EltType', possible loss of data
with
[
EltType=int
]
C:\Users\a-v-d\AppData\Local\Temp\pip-install-__062f80\infotheory_d9c2c9609954478b9b95cf02d1db283a\infotheory\InfoTools.h(1333): warning C4244: 'argument': conversion from 'double' to 'EltType', possible loss of data
with
[
EltType=int
]
./infotheory\PyLinker.cpp(25): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
./infotheory\PyLinker.cpp(33): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
LINK : error LNK2001: unresolved external symbol PyInit_infotheoryClass
build\temp.win-amd64-cpython-39\Release./infotheory\infotheoryClass.cp39-win_amd64.lib : fatal error LNK1120: 1 unresolved externals
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\link.exe' failed with exit code 1120
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for infotheory
Running setup.py clean for infotheory
Failed to build infotheory
ERROR: Could not build wheels for infotheory, which is required to install pyproject.toml-based projects
I do have BuildTools downloaded on my computer.
Is there anythin I am missing?
Can this toolbox be used to calculate conditional mutual information and transfer entropy?
If you wouldn't mind, please add a link in the readme to the corresponding preprint which is https://arxiv.org/abs/1907.02339 . Thanks.
This is the STDERR from pip install --upgrade infotheory
, in a conda 4.7.5 environment in an up to date archlinux. Let me know if you need any further info.
Thanks!
Manolo
pip.log
Hi, you're probably not even maintaining this anymore, but in case you do, I've found that NaNs in the input data are not handled correctly, I think. In case you want to add something about this in the docs...
I'm not sure exactly what happens, but if I have a matrix with 3 columns, and I make some values in the third column NaNs, that will affect calculations of MI between the first two:
import infotheory
import numpy as np
it = infotheory.InfoTools(dims=3, nreps=0)
it.set_equal_interval_binning(nbins=[10, 10, 10], mins=[0, 0, 0], maxs=[1, 1, 1])
mat = np.random.default_rng(42).random((100, 3))
# mat[40:50, 2] = np.nan
it.add_data(mat)
it.mutual_info([0, 1, -1])
Without NaNs in the third variable the resulting MI between the first two variables is 0.6699268749439261. With NaNs, the result is 0.7039212101565637. So the strange thing is that data in an unrelated variable affects the MI between the first two.
After a quick Iook only, one thing that may be happening is that PyFloat_AsDouble
may silently convert NaNs to -1 (https://docs.python.org/3/c-api/float.html#c.PyFloat_AsDouble) perhaps? Which would then mean that the minima passed in are not correct anymore. Though I don't know how this would then affect unrelated variables.
Let me know if you want me to help out addressing this, if you're still aiming to support this package.
Btw, I'm an old friend of Eduardo Izquierdo's ;)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.