Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the generalized score functions for GES been tested? #221

Open
shahashka opened this issue Feb 6, 2025 · 3 comments
Open

Have the generalized score functions for GES been tested? #221

shahashka opened this issue Feb 6, 2025 · 3 comments

Comments

@shahashka
Copy link

I want to used the "local_score_CV_general" score function with GES, but I'm running into an issue with a random test case:

import numpy as np
from causallearn.search.ScoreBased.GES import ges
X = np.random.rand(10,10)
result = ges(X, score_func="local_score_CV_general")

With the following error message

line 360, in local_score_cv_general
dists = Q + R - 2 * X * X.T
ValueError: operands could not be broadcast together with shapes (1,100) (10,10) 

I think this issue is data independent (hence the use of a random matrix as a test), but please correct me if I'm wrong. I noticed that in tests/TestGES.py there are no unit tests for the generalized score functions. Is this functionality not yet validated?

Thank you in advance!

@kunwuz
Copy link
Collaborator

kunwuz commented Feb 16, 2025

Thanks for reporting this! We are actively working on this and will let you know as soon as possible. The test for the score function works well, so it's a little bit weird for me why GES with the generalized score fails.

@kunwuz
Copy link
Collaborator

kunwuz commented Feb 20, 2025

While we are working on this, perhaps you could try using version 0.1.3.8 for now, which should work fine.

@kunwuz
Copy link
Collaborator

kunwuz commented Feb 28, 2025

@zhi-yi-huang has fixed this in #223 , could you please try again and let us know if there is any issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants