Custom CI test
How can I implement a custom CI test to use with PC. It seems that only built in tests are supported now.
#202 this is a good example written by @OliverSchacht
This is a PR. I wasn't planning on modifying the package code but just wanted to test some things out. Is there no way to do that in the python version.
Yeah I understand that. In order to use a custom CI test, you need to wrap it as a class in cit.py, and then directly call it by changing the parameter 'indep_test' in PC. That PR could be helpful for doing that.
And you are right, there is currently no way to do it without any modification of the code.
Thanks. Native support for custom CI tests via a function call would be a great feature.
Thanks for the great suggestion. The CI test classes in cit.py just take X, Y and condition set as input and output the p-value, for example: https://github.com/py-why/causal-learn/blob/e4b5f120256b86b9b9656dfbf1ba9e948b1d56ec/causallearn/utils/cit.py#L148
So, including a native support for that won't be very difficult. We will let you know when this is available. If you would like to use custom tests in the near future, the way mentioned above shouldn't be too complicated either, and I would always be happy to help if you have any questions.