We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Support numpy array or nested list
>>> from pycm import ConfusionMatrix >>> matrix = [[1,2,3],[4,6,1],[1,2,3]] >>> cm = ConfusionMatrix(matrix = matrix) >>> cm2 = ConfusionMatrix(matrix = matrix, classes=["L1","L2","L3"])
>>> cm.print_matrix() Predict 0 1 2 Actual 0 1 2 3 1 4 6 1 2 1 2 3 >>> cm2.print_matrix() Predict L1 L2 L3 Actual L1 1 2 3 L2 4 6 1 L3 1 2 3
Windows 10
Python 3.5.2
pycm.__version__
3.3
The text was updated successfully, but these errors were encountered:
log : changes logged. (#402)
36c1c8b
Array support (#439)
546f70b
* add : __obj_array_handler__ function added. * edit : `matrix` is now accepting arrays. * add : pycmArrayError added. * test : tests added. * log : changes logged. (#402) * edit : minor edits. * edit : pycmArrayError removed. * test : tests added. * add : transpose flag added to __obj_array_handler__. * add : documents added. * edit : minor edits in vector_check. * update : documents updated. * update : Document.ipynb updated. * edit : tests edited. * add : `classes` parameter added to `matrix_params_from_table`. * log : changes logged. * remove : class lenght check relocated to `matrix_params_from_table`. * add : class and array len check added. * add : classes subset check added. * fix : trailing whitespaces in tests fixed. * edit : table -> matrix. * edit : __obj_matrix_handler__ arguments reordered. * fix : minor typo in __init__ fixed. * add : tests for numpy added. * fix : typo fixed. * remove : extra sections removed. * edit : numpy.int64 -> numpy.integer. * edit : `transpose` -> `self.transpose`. * fix : typo fixed. * edit : minor computational improvements in `matrix_params_from_table`. * add : `classes` docstring added to `__obj_matrix_handler__`. * edit : `CLASSES_LENGHT_ERROR` edited. * update : CHANGELOG.md updated.
sadrasabouri
Successfully merging a pull request may close this issue.
Description
Support numpy array or nested list
Steps/Code to Reproduce
Expected Behavior
Operating System
Windows 10
Python Version
Python 3.5.2
PyCM Version (Use :
pycm.__version__
)3.3
The text was updated successfully, but these errors were encountered: