FenTechSolutions / CausalDiscoveryToolbox

Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html
MIT License
1.08k stars 198 forks source link

FSGNN #21

Closed Chechgm closed 5 years ago

Chechgm commented 5 years ago

Hi,

When trying to run:

Fsgnn = FSGNN(train_epochs=1000, test_epochs=500, l1=0.1, batch_size=1000)

From the example notebook of the LUCAS data (with my own data, though) I get the following error:

TypeError: __init__() got an unexpected keyword argument 'batch_size' I wonder whether there are some changes on the definition of the FSGNN subject. Second, I would like to know how does the package manage categorical data, as, from what I have noticed, the values are converted into floats at some point in the objects generation.

Thanks in advance, Sergio

diviyank commented 5 years ago

Hi Sergio, Thanks for the feedback ! Please update your package to the version 0.5 (pushed 2h ago), it fixes quite a lot of bugs, and the doc should be on point.

Concerning the management of categorical data, it is left to the user for now. I should add more details in the doc. Basically models relying on neural network only accept numerical data (as they would be biased with the distributions of categorical variables). Check Algorithms in cdt.causality or cdt.independence that possess a test fit for categorical data, such as PC, GES, Mutual Information tests, etc... and don't forget to apply the tests using the arguments.

Best, Diviyan

Chechgm commented 5 years ago

Thank you very much. I will close this isse now :+1: