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.12k stars 198 forks source link

NCC.py #12

Closed vipulbjj closed 5 years ago

vipulbjj commented 5 years ago

It is written in the code that it outputs 1 or -1 but sigmoid has been used which outputs between 0 and 1. So data with which type of labels is required? Please solve this issue.

diviyank commented 5 years ago

Thank you for the feedback,

I noticed that even then, this version of NCC is bugged. I will recode it. Best, Diviyan

diviyank commented 5 years ago

Hi, It should be fixed by now. The targets are -1,1 like other algorithms. Although I used a dirty trick of y = y/2 + .5...

Best, Diviyan

vipulbjj commented 5 years ago

@Diviyan-Kalainathan I tried training this a number of times with different amounts of data. But I'm getting the same output for every input. After trying to debug I realised that it's output before the sigmoid layer is very close to 0 and due to the slope being very low there, the differences before the sigmoid layer(small) diminish. Can you please check it? Maybe the number of hidden layers in the model is less than what is required for a sizeable data.

diviyank commented 5 years ago

Very strange... have you updated your package ? Which kind of data are you using to train the model ? (remember to feed labels -1, +1) (If it's a public dataset, I'll be glad to take a look) I am not able to reproduce this, in my case the model trains properly (on a simple dataset though) There is a hyperparameter that you can modify to change the number of hidden units, but not for the number of layers ; try increasing the number of hidden units for now.

Best, Diviyan

diviyank commented 5 years ago

Closing for inactivity. Feel free to reopen it if not solved.