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

Cannot simulate data #176

Open
JohannesWiesner opened this issue Jul 26, 2023 · 2 comments
Open

Cannot simulate data #176

JohannesWiesner opened this issue Jul 26, 2023 · 2 comments

Comments

@JohannesWiesner
Copy link
Contributor

Hi James, I tried to simulate data using this example, but I get:

LinAlgError: Matrix is not positive definite

@jameschapman19
Copy link
Owner

I assume you mean you get that error when you run exactly the code in the example? If so could you share scikit-learn version as that's the only place I can think it comes from.

If it's from adding sparsity the Positive Definite problem can happen and you can try changing the random seed a bit.

If you aren't bothered about having a random covariance structure then you can pass

LinearSimulatedData(structure='identity')

which I think works more generally but can make signal recovery more difficult.

@JohannesWiesner
Copy link
Contributor Author

LinearSimulatedData(structure='identity') solved it for me but changing the random seed did not have any effect. I am using scikit-learn 1.3.0

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