TheoBourdais / ComputationalHypergraphDiscovery

This is the source code for the paper "Computational Hypergraph Discovery: A Gaussian process framework for connecting the dots".
Apache License 2.0
2 stars 0 forks source link

Crashed on quick start example #3

Open NicolasRouquette opened 4 months ago

NicolasRouquette commented 4 months ago
import ComputationalHypergraphDiscovery as CHD
import pandas as pd
df=pd.read_csv('https://raw.githubusercontent.com/TheoBourdais/ComputationalHypergraphDiscovery/main/examples/SachsData.csv')
kernels=CHD.Modes.LinearMode()+CHD.Modes.QuadraticMode()
graph_discovery = CHD.GraphDiscovery.from_dataframe(df,mode_kernels=kernels)
graph_discovery.fit()
graph_discovery.plot_graph()

With Python 3.10.12, I get:

Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
If this would cause problems for you,
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466

  import pandas as pd
[1]    1035064 killed 
TheoBourdais commented 4 months ago

Hi Nicolas,

I do not think this is an issue with the code itself rather a Pandas issue. This seems to be a problem with your installation of Pandas

NicolasRouquette commented 4 months ago

I ran the above script with the debugger. The crash happens at this line:

https://github.com/TheoBourdais/ComputationalHypergraphDiscovery/blob/main/src/ComputationalHypergraphDiscovery/Modes/kernels.py#L250

In the debugger, I see that crash happens when Python attempts to invoke the '*' operation in the expression:

np.expand_dims(linear_mat, 0) * np.expand_dims(linear_mat, 1)

Does this help?