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

fixed EDA feature cvx matrix creation #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hugodecasta
Copy link

@hugodecasta hugodecasta commented Feb 1, 2024

Fixing EDA CVX matrix creation

Related to issue #6

The cvx.matrix call can raise a buffer format not supported exception resulting in an empty end DataFrame from feature extraction.

This is due to the y input format being in float32 instead of float64

https://stackoverflow.com/questions/33423081/converting-numpy-vector-to-cvxopt#answers
https://github.com/cvxopt/cvxopt/blob/3b718ee560b3b97d6255c55f0ed7f64cb4b72082/src/C/dense.c#L231

Past code

...
n = len(y)
y = cvx.matrix(y)
...

Modifyed code

...
n = len(y)
y = y.astype(np.double)
y = cvx.matrix(y)
...

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

Successfully merging this pull request may close these issues.

1 participant