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

[Question] "Variances must be positive" Error When Using Normal().fit(data) and Adding Beta Distribution Support #1112

Open
Des11111 opened this issue Aug 5, 2024 · 1 comment

Comments

@Des11111
Copy link

Des11111 commented Aug 5, 2024

Hi Jacob,

I encountered a ValueError while trying to fit a Normal(covariance_type='diag').fit() distribution to my data. The error message states, "Variances must be positive." Meanwhile when I was trying to use Normal(covariance_type='full').fit(), it raised error that "RuntimeError: linalg.cholesky: The input tensor A must have at least 2 dimensions."

My dataset has a shape of 2000x2, with each column approximately normally distributed. I just cannot figure out why the covariance could be negative. One dimension of my dataset is like:
image

Another question is that I searched the package documentation but couldn't find a method to fit a Beta distribution. Is there a solution or workaround available for fitting a Beta distribution to my data?

Thank you in advance for any assistance you can provide.

Best,
Ruoxiao

@Des11111
Copy link
Author

Des11111 commented Aug 6, 2024

Alright, I believe I have found the solution to the first problem. It appears that some of my data samples are too small, which causes their distribution to deviate significantly from what is expected for a normal distribution.

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

1 participant