NLnet foundation has supported the PyCM project from version 3.6 to 4.0 through the NGI Assure Fund. This fund is set up by NLnet foundation with funding from the European Commission's Next Generation Internet program, administered by DG Communications Networks, Content, and Technology under grant agreement No 957073.
Python Software Foundation (PSF) grants PyCM library partially for version 3.7. PSF is the organization behind Python. Their mission is to promote, protect, and advance the Python programming language and to support and facilitate the growth of a diverse and international community of Python programmers.
Papers and Reports
- PyCM: Multiclass confusion matrix library in Python - May 2018
- A Literature Review on Rater Agreement Metrics - Sep 2022
Version 4.5
optimal_thresholdsmethod inROCCurveclass added- Python typing features added to all modules
- Test system modified
Source Code (.Zip) (1.38 MB)
Source Code (.tar.gz) (1.35 MB)
Version 4.4
print_timingsmethod added- Test outcome positive rate added
- Positive rate added
run_report_benchmarkfunction addedREADME.mdmodified- Test system modified
- Document modified
PRE_calcfunction renamed toproportion_calcPython 3.6support dropped
Source Code (.Zip) (1.38 MB)
Source Code (.tar.gz) (1.34 MB)
Version 4.3
dissimilarity_matrixmethod added- HTML generator engine modified
README.mdmodified- Document modified
- String templates modified
html_initfunction removedhtml_endfunction removed
Source Code (.Zip) (1.37 MB)
Source Code (.tar.gz) (1.33 MB)
Version 4.2
- 5 new distance/similarity added
- KuhnsIII
- KuhnsIV
- KuhnsV
- KuhnsVI
- KuhnsVII
- Test system modified
- PyPI badge in
README.md - GitHub actions are limited to the
devandmasterbranches AUTHORS.mdupdatedREADME.mdmodified- Document modified
Source Code (.Zip) (1.37 MB)
Source Code (.tar.gz) (1.33 MB)
Version 4.1
- 5 new distance/similarity added
- KoppenI
- KoppenII
- KuderRichardson
- KuhnsI
- KuhnsII
feature_request.ymltemplate addedconfig.ymlfor issue template addedSECURITY.mdadded- Bug report template modified
thresholds_calcfunction updated__midpoint_numeric_integral__function updated__trapezoidal_numeric_integral__function updated- Diagrams updated
- Document modified
- Document build system updated
AUTHORS.mdupdatedREADME.mdmodified- Test system modified
Python 3.12added totest.ymlPython 3.13added totest.yml- Warning and error messages updated
pycm_util.pyrenamed toutils.pypycm_test.pyrenamed tobasic_test.pypycm_profile.pyrenamed toprofile.pypycm_param.pyrenamed toparams.pypycm_overall_func.pyrenamed tooverall_funcs.pypycm_output.pyrenamed tooutput.pypycm_obj.pyrenamed tocm.pypycm_multilabel_cm.pyrenamed tomultilabel_cm.pypycm_interpret.pyrenamed tointerpret.pypycm_handler.pyrenamed tohandlers.pypycm_error.pyrenamed toerrors.pypycm_distance.pyrenamed todistance.pypycm_curve.pyrenamed tocurve.pypycm_compare.pyrenamed tocompare.pypycm_class_func.pyrenamed toclass_funcs.pypycm_ci.pyrenamed toci.py
Source Code (.Zip) (1.34 MB)
Source Code (.tar.gz) (1.31 MB)
Version 4.0
pycmMultiLabelErrorclass addedMultiLabelCMclass addedget_cm_by_classmethod addedget_cm_by_samplemethod added__mlcm_vector_handler__function added__mlcm_assign_classes__function added__mlcm_vectors_filter__function added__set_to_multihot__function addeddeprecatedfunction added- Document modified
README.mdmodified- Example-4 modified
- Test system modified
- Python 3.5 support dropped
Source Code (.Zip) (943 KB)
Source Code (.tar.gz) (908 KB)
Version 3.9
OVERALL_PARAMSdictionary added__imbalancement_handler__function addedvector_serializerfunction added- NPV micro/macro added
log_lossmethod added- 23 new distance/similarity added
- Dennis
- Digby
- Dispersion
- Doolittle
- Eyraud
- Fager & McGowan
- Faith
- Fleiss-Levin-Paik
- Forbes I
- Forbes II
- Fossum
- Gilbert & Wells
- Goodall
- Goodman & Kruskal's Lambda
- Goodman & Kruskal Lambda-r
- Guttman's Lambda A
- Guttman's Lambda B
- Hamann
- Harris & Lahey
- Hawkins & Dotson
- Kendall's Tau
- Kent & Foster I
- Kent & Foster II
metrics_offparameter added to ConfusionMatrix__init__methodCLASS_PARAMSchanged to a dictionary- Code style modified
sortparameter added torelabelmethod- Document modified
CONTRIBUTING.mdupdatedcodecovremoved fromdev-requirements.txt- Test system modified
Source Code (.Zip) (940 KB)
Source Code (.tar.gz) (906 KB)
Version 3.8
distancemethod added__contains__method added__getitem__method added- Goodman-Kruskal's Lambda A benchmark added
- Goodman-Kruskal's Lambda B benchmark added
- Krippendorff's Alpha benchmark added
- Pearson's C benchmark added
- 30 new distance/similarity added
- AMPLE
- Anderberg's D
- Andres & Marzo's Delta
- Baroni-Urbani & Buser I
- Baroni-Urbani & Buser II
- Batagelj & Bren
- Baulieu I
- Baulieu II
- Baulieu III
- Baulieu IV
- Baulieu V
- Baulieu VI
- Baulieu VII
- Baulieu VIII
- Baulieu IX
- Baulieu X
- Baulieu XI
- Baulieu XII
- Baulieu XIII
- Baulieu XIV
- Baulieu XV
- Benini I
- Benini II
- Canberra
- Clement
- Consonni & Todeschini I
- Consonni & Todeschini II
- Consonni & Todeschini III
- Consonni & Todeschini IV
- Consonni & Todeschini V
relabelmethod sort bug fixedREADME.mdmodifiedCompareoverall benchmarks default weights updated- Document modified
- Test system modified
Source Code (.Zip) (927 KB)
Source Code (.tar.gz) (892 KB)
Version 3.7
Curveclass addedROCCurveclass addedPRCurveclass addedpycmCurveErrorclass addedCONTRIBUTING.mdupdatedmatrix_params_calcfunction optimizedREADME.mdmodified- Document modified
- Test system modified
Python 3.11added totest.yml
Source Code (.Zip) (916 KB)
Source Code (.tar.gz) (881 KB)
Version 3.6
- Hamming distance added
- Braun-Blanquet similarity added
classesparameter added tomatrix_params_from_tablefunction- Matrices with
numpy.integerelements are now accepted - Arrays added to
matrixparameter accepting formats - Website changed to http://www.pycm.io
- Document modified
README.mdmodified
Source Code (.Zip) (883 KB)
Source Code (.tar.gz) (850 KB)
Version 3.5
- Anaconda workflow added
- Custom iterating setting added
- Custom casting setting added
plotmethod updatedclass_statisticsfunction modifiedoverall_statisticsfunction modifiedBCD_calcfunction modifiedCONTRIBUTING.mdupdatedCODE_OF_CONDUCT.mdupdated- Document modified
Source Code (.Zip) (871 KB)
Source Code (.tar.gz) (836 KB)
Version 3.4
- Colab badge added
- Discord badge added
brier_scoremethod addedJ (Jaccard index)section inDocument.ipynbupdatedsave_objmethod updatedPython 3.10added totest.yml- Example-3 updated
- Docstrings of the functions updated
CONTRIBUTING.mdupdated
Source Code (.Zip) (870 KB)
Source Code (.tar.gz) (834 KB)
Version 3.3
__compare_weight_handler__function addedis_imbalancedparameter added to ConfusionMatrix__init__methodclass_benchmark_weightandoverall_benchmark_weightparameters added to Compare__init__methodstatistic_recommendfunction modified- Compare
weightparameter renamed toclass_weight - Document modified
- License updated
AUTHORS.mdupdatedREADME.mdmodified- Block diagrams updated
Source Code (.Zip) (865 KB)
Source Code (.tar.gz) (830 KB)
Version 3.2
classes_filterfunction addedclassesparameter added tomatrix_params_calcfunctionclassesparameter added to__obj_vector_handler__functionclassesparameter added to ConfusionMatrix__init__methodnameparameter removed fromhtml_initfunctionshortenerparameter added tohtml_tablefunctionshortenerparameter added tosave_htmlmethod- Document modified
- HTML report modified
Source Code (.Zip) (1.1 MB)
Source Code (.tar.gz) (1.1 MB)
Version 3.1
requirements-splitter.pyaddedsensitivity_indexmethod added- Test system modified
overall_statisticsfunction modified- HTML report modified
- Document modified
- References format updated
CONTRIBUTING.mdupdated
Source Code (.Zip) (1.1 MB)
Source Code (.tar.gz) (1.1 MB)
Version 3.0
plot_test.pyaddedaxes_genfunction addedadd_number_labelfunction addedplotmethod addedcombinemethod addedmatrix_combinefunction added- Document modified
README.mdmodified- Example-2 deprecated
- Example-7 deprecated
- Error messages modified
Source Code (.Zip) (1.1 MB)
Source Code (.tar.gz) (1.1 MB)
Version 2.9
notebook_check.pyaddedto_arraymethod added__copy__method addedcopymethod addedaveragemethod refactored
Source Code (.Zip) (1 MB)
Source Code (.tar.gz) (1 MB)
Version 2.8
label_mapattribute addedpositionsattribute addedpositionmethod added- Krippendorff's Alpha added
- Aickin's Alpha added
weighted_alphamethod added- Single class bug fixed
CLASS_NUMBER_ERRORerror type changed topycmMatrixErrorrelabelmethod bug fixed- Document modified
README.mdmodified
Source Code (.Zip) (1 MB)
Source Code (.tar.gz) (1 MB)
Version 2.7
averagemethod addedweighted_averagemethod addedweighted_kappamethod addedpycmAverageErrorclass added- Bangdiwala's B added
- MATLAB examples added
- Github action added
- Document modified
README.mdmodifiedrelabelmethod bug fixedsparse_table_printfunction bug fixedmatrix_checkfunction bug fixed- Minor bug in
Compareclass fixed - Class names mismatch bug fixed
Source Code (.Zip) (1 MB)
Source Code (.tar.gz) (1 MB)
Version 2.6
custom_rounderfunction addedcomplementfunction addedsparse_matrixattribute addedsparse_normalized_matrixattribute added- Net benefit (NB) added
- Yule's Q interpretation (QI) added
- Adjusted Rand index (ARI) added
- TNR micro/macro added
- FPR micro/macro added
- FNR micro/macro added
sparseparameter addedheaderparameter added tosave_csvmethod- Handler functions moved to
pycm_handler.py - Error objects moved to
pycm_error.py - Verified tests references updated
- Verified tests moved to
verified_test.py - Test system modified
CONTRIBUTING.mdupdated- Namespace optimized
README.mdmodified- Document modified
print_normalized_matrixmethod modifiednormalized_table_calcfunction modifiedsetup.pymodified- summary mode updated
- Dockerfile updated
Python 3.8added to.travis.yamlandappveyor.yml
Source Code (.Zip) (1 MB)
Source Code (.tar.gz) (1 MB)
Version 2.5
__version__variable added- Individual classification success index (ICSI) added
- Classification success index (CSI) added
- Example-8 (Confidence interval) added
install.shaddedautopep8.shadded- Dockerfile added
-
CImethod added to- ACC
- AUC
- Overall ACC
- Kappa
- TPR
- TNR
- PPV
- NPV
- PLR
- NLR
- PRE
test.shmoved to.travisfolder- Python 3.4 support dropped
- Python 2.7 support dropped
AUTHORS.mdupdatedsave_stat,save_csvandsave_htmlmethods Non-ASCII character bug fixed- Mixed type input vectors bug fixed
CONTRIBUTING.mdupdated- Example-3 updated
README.mdmodified- Document modified
CIattribute renamed toCI95kappa_se_calcfunction renamed tokappa_SE_calcse_calcfunction modified and renamed toSE_calc- CI/SE functions moved to
pycm_ci.py - Minor bug in save_html method fixed
Source Code (.Zip) (1 MB)
Source Code (.tar.gz) (1 MB)
Version 2.4
- Tversky index (TI) added
- Area under the PR curve (AUPR) added
FUNDING.ymladdedAUC_calcfunction modified- Document modified
summaryparameter added to save and stat methodssample_weightbug innumpyarray format fixed- Inputs manipulation bug fixed
- Test system modified
- Warning system modified
alt_linkparameter added tosave_htmlmethod andonline_helpfunctionCompareclass tests moved tocompare_test.py- Warning tests moved to
warning_test.py
Source Code (.Zip) (894 KB)
Source Code (.tar.gz) (869 KB)
Version 2.3
- Adjusted F-score (AGF) added
- Overlap coefficient (OC) added
- Otsuka-Ochiai coefficient (OOC) added
save_statandsave_vectorparameters added tosave_objmethod- Document modified
README.mdmodified- Parameters recommendation for imbalance dataset modified
- Minor bug in
Compareclass fixed pycm_helpfunction modified- Benchmarks color modified
Source Code (.Zip) (882 KB)
Source Code (.tar.gz) (861 KB)
Version 2.2
- Negative likelihood ratio interpretation (NLRI) added
- Cramer's benchmark (SOA5) added
- Matthews correlation coefficient interpretation (MCCI) added
- Matthews's benchmark (SOA6) added
- F1 macro added
- F1 micro added
- Accuracy macro added
Compareclass score calculation modified- Parameters recommendation for multi-class dataset modified
- Parameters recommendation for imbalance dataset modified
README.mdmodified- Document modified
- Logo updated
Source Code (.Zip) (871 KB)
Source Code (.tar.gz) (849 KB)
Version 2.1
- Adjusted geometric mean (AGM) added
- Yule's Q (Q) added
Compareclass and parameters recommendation system block diagrams added- Document links bug fixed
- Document modified
Source Code (.Zip) (790 KB)
Source Code (.tar.gz) (768 KB)
Version 2.0
- G-Mean (GM) added
- Index of balanced accuracy (IBA) added
- Optimized precision (OP) added
- Pearson's C (C) added
Compareclass added- Parameters recommendation warning added
ConfusionMatrixequal method added- Document modified
stat_printfunction bug fixedtable_printfunction bug fixedBetaparameter renamed tobeta- Parameters recommendation for imbalance dataset modified
normalizeparameter added tosave_htmlmethodpycm_func.pysplitted- filter and check functions moved to
pycm_util.py RACC_calcandRACCU_calcfunctions exception handler modified- Docstrings modified
Source Code (.Zip) (731 KB)
Source Code (.tar.gz) (709 KB)
Version 1.9
- Automatic/Manual (AM) added
- Bray-Curtis dissimilarity (BCD) added
CODE_OF_CONDUCT.mdaddedISSUE_TEMPLATE.mdaddedPULL_REQUEST_TEMPLATE.mdaddedCONTRIBUTING.mdadded- X11 color names support for
save_htmlmethod added - Parameters recommendation system added
- Warning message for high dimension matrix print added
- Interactive notebooks section (binder) added
save_matrixandnormalizearguments added tosave_csvmethodREADME.mdmodified- Document modified
__init__optimized- Document and examples output files moved to different folders
- Test system modified
relabelmethod bug fixed
Source Code (.Zip) (710 KB)
Source Code (.tar.gz) (689 KB)
Version 1.8
- Lift Score (LS) added
colorargument added tosave_htmlmethodversion_check.pyadded- Error messages modified
- Document modified
- Website changed to http://www.pycm.ir
- Interpretation functions moved to
pycm_interpret.py - Utility functions moved to
pycm_util.py - Unnecessary else and elif removed
==changed tois
Source Code (.Zip) (675 KB)
Source Code (.tar.gz) (663 KB)
Version 1.7
- Gini Index (GI) added
- Example-7 added
pycm_profile.pyaddedclass_nameargument added tostat,save_stat,save_csvandsave_htmlmethodsoverall_paramandclass_paramarguments empty list bug fixedmatrix_params_calc,matrix_params_from_tableandvector_filterfunctions optimizedoverall_MCC_calc,CEN_misclassification_calcandconvex_combinationfunctions optimized- Document modified
Source Code (.Zip) (671 KB)
Source Code (.tar.gz) (660 KB)
Version 1.6
- AUC Value Interpretation (AUCI) added
- Example-6 added
- Anaconda cloud package added
overall_paramandclass_paramarguments added tostat,save_statandsave_htmlmethodsclass_paramargument added tosave_csvmethod_removed from overall statistics namesREADME.mdmodified- Document modified
Source Code (.Zip) (608 KB)
Source Code (.tar.gz) (597 KB)
Version 1.5
- Relative Classifier Information (RCI) added
- Discriminator Power (DP) added
- Youden's Index (Y) added
- Discriminant Power Interpretation (DPI) added
- Positive Likelihood Ratio Interpretation (PLRI) added
__len__method addedrelabelmethod added__class_stat_init__function added__overall_stat_init__function addedmatrixattribute addednormalized_matrixattribute addednormalized_tableattribute addedPython 3.7added to.travis.yml&appveyor.ymlREADME.mdmodified- Document modified
LR+renamed toPLRLR-renamed toNLRnormalized_matrixmethod renamed to print_normalized_matrixmatrix methodrenamed to print_matrixentropy_calcfixedcross_entropy_calcfixedconditional_entropy_calcfixedprint_tablebug for large numbers fixed- JSON key bug in
save_objfixed transposebug insave_obj
Source Code (.Zip) (604 KB)
Source Code (.tar.gz) (593 KB)
Version 1.4
- Area Under Curve added
- AUNU added
- AUNP added
- Class Balance Accuracy added
- Global Performance Index (RR) added
- Overall MCC added
- Distance index (dInd) added
- Similarity index (sInd) added
one_vs_alladdeddev-requirements.txtaddedREADME.mdmodified- Document modified
save_statmodifiedrequirements.txtmodified
Source Code (.Zip) (597 KB)
Source Code (.tar.gz) (586 KB)
Version 1.3
- Confusion Entropy added
- Overall Confusion Entropy added
- Modified Confusion Entropy added
- Overall Modified Confusion Entropy added
- Information Score added
README.mdmodified
Source Code (.Zip) (588 KB)
Source Code (.tar.gz) (577 KB)
Version 1.2
- NIR (No Information Rate) added
- P-Value added
sample_weightaddedtransposeaddedREADME.mdmodified- Key error in some parameters fixed
OSXenv added to.travis.yml
Source Code (.Zip) (584 KB)
Source Code (.tar.gz) (574 KB)
Version 1.1
- Zero-one loss added
- Support added
online_helpfunction addedREADME.mdmodifiedhtml_tablefunction modifiedtable_printfunction modifiednormalized_table_printfunction modified
Source Code (.Zip) (503 KB)
Source Code (.tar.gz) (495 KB)
Version 1.0
- Hamming loss added
README.mdmodified
Source Code (.Zip) (500 KB)
Source Code (.tar.gz) (493 KB)
Version 0.9.5
- Obj load added
- Obj save added
- Example-4 added
README.mdmodified- Block diagram updated
Source Code (.Zip) (500 KB)
Source Code (.tar.gz) (493 KB)
Version 0.9
- Activation Threshold added
- Example-3 added
- Jaccard index added
- Overall Jaccard index added
README.mdmodifiedsetup.pymodified
Source Code (.Zip) (361 KB)
Source Code (.tar.gz) (353 KB)
Version 0.8.6
- Example section in document added
- Python 2.7 CI added
- JOSS paper pdf added
- Cite section modified
- ConfusionMatrix docstring modified
- round function changed to numpy.around
README.mdmodified
Source Code (.Zip) (358 KB)
Source Code (.tar.gz) (351 KB)
Version 0.8.5
- Confusion matrix size in HTML report modified
- Example-1 (Comparison of three different classifiers) added
- Example-2 (How to plot via matplotlib) added
- ConfusionMatrix docstring added
- JOSS paper added
- Test system modified
README.mdmodified
Source Code (.Zip) (237 KB)
Source Code (.tar.gz) (227 KB)
Version 0.8.1
-
New parameters added
- Goodman and Kruskal's lambda B
- Goodman and Kruskal's lambda A
- Cross Entropy
- Conditional Entropy
- Joint Entropy
- Reference Entropy
- Response Entropy
- Kullback-Liebler divergence
- Mutual Information
- Kappa Unbiased
- Kappa No Prevalence
- Random Accuracy Unbiased
- Direct ConfusionMatrix added
pycmVectorErrorclass addedpycmMatrixErrorclass added- Support
numpyarrays pycmErrorclass removed
Source Code (.Zip) (111 KB)
Source Code (.tar.gz) (105 KB)
Version 0.7
-
New parameters added
- Cramer's V
- 95% Confidence interval
- Chi-Squared
- Phi-Squared
- Chi-Squared DF
- Standard error
- Kappa standard error
- Kappa 95% confidence interval
- Cicchetti benchmark
- Parameters description links in HTML report modified
- Confusion matrix color in HTML report modified
Source Code (.Zip) (60 KB)
Source Code (.tar.gz) (56 KB)
Version 0.6
- CSV Report added (
save_csv) - Changelog added
- Confusion matrix color in HTML report changed
- Parameters description links in HTML report added
Source Code (.Zip) (56 KB)
Source Code (.tar.gz) (52 KB)
Version 0.5
-
New parameters added
- Scott's pi
- Gwet's AC1
- Bennett S score
- HTML Report Added (
save_html)
Source Code (.Zip) (50 KB)
Source Code (.tar.gz) (48 KB)
Version 0.4
-
New parameters added
- TPR Micro/Macro
- PPV Micro/Macro
- RACC Overall
- Normalized matrix bugs fixed
- Zero class bugs fixed
- Fleiss & Altman benchmarks added
- Output file(.pycm) method added
Source Code (.Zip) (47 KB)
Source Code (.tar.gz) (45 KB)
Version 0.3
-
New parameters added
- Kappa
- Random Accuracy
- Strength of Agreement
- Overall statistics added
- Round bug fixed
Source Code (.Zip) (45 KB)
Source Code (.tar.gz) (43 KB)
Version 0.2
-
New parameters added
- Population
- Condition positive
- Test outcome positive
- Test outcome negative
- Prevalence
- G-measure
- matrix & normalized_matrix method added
- params method added
Source Code (.Zip) (42 KB)
Source Code (.tar.gz) (40 KB)
Version 0.1
- First Release
-
Supported Class Statistics
- ACC
- BM
- DOR
- F1-Score
- FDR
- FNR
- FOR
- FPR
- LR+
- LR-
- MCC
- MK
- NPV
- PPV
- TNR
- TPR
Source Code (.Zip) (40 KB)
Source Code (.tar.gz) (38 KB)