-
Notifications
You must be signed in to change notification settings - Fork 19
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
CCA error handling for too few rows #503
Comments
Here is the server error when I stopped checking for inputs and outputs <= number of rows: Traceback (most recent call last):
File "/home/slycat/src/slycat/web-server/plugins/slycat-cca/slycat-cca.py", line 51, in compute
x, y, x_loadings, y_loadings, r, wilks = slycat.cca.cca(X, Y, scale_inputs=scale_inputs)
File "/home/slycat/src/slycat/packages/slycat/cca.py", line 109, in cca
A = numpy.linalg.solve(R1, L)
File "/home/slycat/install/conda/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 355, in solve
_assertNdSquareness(a)
File "/home/slycat/install/conda/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 212, in _assertNdSquareness
raise LinAlgError('Last 2 dimensions of the array must be square')
LinAlgError: Last 2 dimensions of the array must be square |
When using 2 inputs and 2 outputs on data that contains 2 rows, I get the following server error: Traceback (most recent call last):
File "/home/slycat/src/slycat/web-server/plugins/slycat-cca/slycat-cca.py", line 51, in compute
x, y, x_loadings, y_loadings, r, wilks = slycat.cca.cca(X, Y, scale_inputs=scale_inputs)
File "/home/slycat/src/slycat/packages/slycat/cca.py", line 109, in cca
A = numpy.linalg.solve(R1, L)
File "/home/slycat/install/conda/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 381, in solve
r = gufunc(a, b, signature=signature, extobj=extobj)
File "/home/slycat/install/conda/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
LinAlgError: Singular matrix |
1 input and 1 output with 2 rows of data creates a model. |
alexsielicki
added a commit
that referenced
this issue
Oct 29, 2015
alexsielicki
added a commit
that referenced
this issue
Nov 2, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, when the number of inputs or outputs selected in CCA is greater than the number of rows in the table, the CCA model creation will fail and the user will see an error that the number of rows cannot be less than the X/Y variables. Since this problem could be predicted during ingestion, we should catch it up front when the user is making their selections. Also, I am puzzled by a hard failure here. We used to allow this sort of CCA model to be created, it just wasn't very informative because it would always return multiple perfect correlations. I think that the interface should inform the user that this result will be produced given their current set of choices (and allow them to modify their choices) and then if they still want to create the model, we should let them do it.
The text was updated successfully, but these errors were encountered: