Skip to content

Commit

Permalink
Merge pull request #420 from sepandhaghighi/dev
Browse files Browse the repository at this point in the history
Version 3.4
  • Loading branch information
sepandhaghighi authored Jan 26, 2022
2 parents 50fe8f5 + a7d599f commit 8402184
Show file tree
Hide file tree
Showing 52 changed files with 2,132 additions and 1,535 deletions.
21 changes: 19 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Please consider the following :
- To add a new class statistic visit [here](#class-statistic)
- To add a new overall statistic visit [here](#overall-statistic)
- To add a new interpretation visit [here](#interpretation)
4. Add standard `docstring` to your functions/methods
4. Add standard `docstring` to your functions/methods according to the [standard format](#standard-docstring-format)
5. Add tests for your functions/methods (`doctest`, `Test` folder)
6. Update `README.md` (if needed)
7. Update `Document.ipynb` (if needed)
Expand Down Expand Up @@ -80,4 +80,21 @@ Please consider the following :
- Update `OVERALL_BENCHMARK_SCORE_DICT` in `pycm_param.py`
6. Add tests to `compare_test.py`, `overall_test.py` and `function_test.py` in `TEST` folder
- If you have any verified test add them to `verified_test.py`
7. Run `autopep8.bat`/`autopep8.sh` (*Optional*, need to install latest version of `autopep8` package)
7. Run `autopep8.bat`/`autopep8.sh` (*Optional*, need to install latest version of `autopep8` package)

## Standard docstring format
Here, the `docstring` format mainly follows the PEP suggested structure. Note the following items
- Start the `docstring` description with uppercase letter and end it with a dot
- All other descriptions should be written in lowercase (unless exceptions)
- Declare the abbreviations before using them

Example:

def DF_calc(classes):
"""
Calculate Chi-squared degree of freedom (DF).

:param classes: confusion matrix classes
:type classes: list
:return: DF as int
"""
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
- [Negar Zabetian](https://github.com/negarzabetian)
- [Ashwin Geet D'Sa](https://github.com/GeetDsa)
- [Ilya Gubins](https://github.com/the-lay)
- [Lewi Uberg](https://github.com/lewiuberg)
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [3.4] - 2022-01-26
### Added
- Colab badge
- Discord badge
- `brier_score` method
### Changed
- `J (Jaccard index)` section in `Document.ipynb` updated
- `save_obj` method updated
- `Python 3.10` added to `test.yml`
- Example-3 updated
- Docstrings of the functions updated
- `CONTRIBUTING.md` updated
## [3.3] - 2021-10-27
### Added
- `__compare_weight_handler__` function
Expand Down Expand Up @@ -557,7 +569,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- TPR
- documents and `README.md`

[Unreleased]: https://github.com/sepandhaghighi/pycm/compare/v3.3...dev
[Unreleased]: https://github.com/sepandhaghighi/pycm/compare/v3.4...dev
[3.4]: https://github.com/sepandhaghighi/pycm/compare/v3.3...v3.4
[3.3]: https://github.com/sepandhaghighi/pycm/compare/v3.2...v3.3
[3.2]: https://github.com/sepandhaghighi/pycm/compare/v3.1...v3.2
[3.1]: https://github.com/sepandhaghighi/pycm/compare/v3.0...v3.1
Expand Down
45 changes: 45 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "pycm"
abstract: "PyCM is a multi-class confusion matrix library written in Python that supports both input data vectors and direct matrix, and a proper tool for post-classification model evaluation that supports most classes and overall statistics parameters. PyCM is the swiss-army knife of confusion matrices, targeted mainly at data scientists that need a broad array of metrics for predictive models and accurate evaluation of a large variety of classifiers."
authors:
- family-names: "Haghighi"
given-names: "Sepand"
- family-names: "Zolanvari"
given-names: "Alireza"
- family-names: "Sabouri"
given-names: "Sadra"
version: 3.3
date-released: 2021-10-27
repository-code: "https://github.com/sepandhaghighi/pycm"
url: "https://www.pycm.ir"
license: MIT
keywords:
- "confusion matrix"
- "python"
- "F-score"
- "Accuracy"
preferred-citation:
type: article
authors:
- family-names: "Haghighi"
given-names: "Sepand"
orcid: "https://orcid.org/0000-0001-9450-2375"
- family-names: "Jasemi"
given-names: "Masoomeh"
orcid: "https://orcid.org/0000-0002-4831-1698"
- family-names: "Hessabi"
given-names: "Shaahin"
orcid: "https://orcid.org/0000-0003-3193-2567"
- family-names: "Zolanvari"
given-names: "Alireza"
orcid: "https://orcid.org/0000-0003-2367-8343"
doi: "10.21105/joss.00729"
journal: "Journal of Open Source Software"
month: 5
start: 729 # First page number
end: 729 # Last page number
title: "PyCM: Multiclass confusion matrix library in Python"
issue: 25
volume: 3
year: 2018
Loading

0 comments on commit 8402184

Please sign in to comment.