Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ 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]
### Added
- `pycmError` class
### Changed
- `README.md` modified
- Document modified
Expand Down
3 changes: 2 additions & 1 deletion pycm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""PyCM modules."""
from .params import PYCM_VERSION, OVERALL_BENCHMARK_LIST, CLASS_BENCHMARK_LIST
from .errors import pycmVectorError, pycmMatrixError, pycmCIError, pycmAverageError, pycmCompareError, pycmPlotError, pycmCurveError, pycmMultiLabelError
from .errors import pycmError, pycmVectorError, pycmMatrixError, pycmCIError, pycmAverageError, pycmCompareError, pycmPlotError, pycmCurveError, pycmMultiLabelError
from .output import pycm_help, online_help
from .distance import DistanceType
from .cm import ConfusionMatrix
Expand Down Expand Up @@ -31,6 +31,7 @@
"generate_confusion_matrix_with_scenario",
"ClassDistributionScenario",
"run_report_benchmark",
"pycmError",
"pycmVectorError",
"pycmMatrixError",
"pycmCIError",
Expand Down
21 changes: 13 additions & 8 deletions pycm/errors.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,55 @@
# -*- coding: utf-8 -*-
"""ConfusionMatrix, Compare and CI errors."""

class pycmError(Exception):
"""Base error class."""

class pycmVectorError(Exception):
pass


class pycmVectorError(pycmError):
"""Vector error class."""

pass


class pycmMatrixError(Exception):
class pycmMatrixError(pycmError):
"""Matrix error class."""

pass


class pycmCIError(Exception):
class pycmCIError(pycmError):
"""CI error class."""

pass


class pycmAverageError(Exception):
class pycmAverageError(pycmError):
"""Average error class."""

pass


class pycmCompareError(Exception):
class pycmCompareError(pycmError):
"""Compare error class."""

pass


class pycmPlotError(Exception):
class pycmPlotError(pycmError):
"""Plot error class."""

pass


class pycmCurveError(Exception):
class pycmCurveError(pycmError):
"""Curve error class."""

pass


class pycmMultiLabelError(Exception):
class pycmMultiLabelError(pycmError):
"""Multilabel error class."""

pass
Loading