Skip to content

classification

Accuracy(features=None)

Bases: SelectMixin, LazyMixin, Metric

Accuracy classification score.

As defined by scikit-learn.

Initialize metric.

Parameters:

Name Type Description Default
features list[str] | None

The features to calculate the metric for. If None, the metric uses all features in the data.

None
Source code in src/flowcean/sklearn/metrics/classification.py
16
17
18
19
20
21
22
23
24
25
26
def __init__(
    self,
    features: list[str] | None = None,
) -> None:
    """Initialize metric.

    Args:
        features: The features to calculate the metric for. If None, the
            metric uses all features in the data.
    """
    super().__init__(features=features)

ClassificationReport(features=None)

Bases: SelectMixin, LazyMixin, Metric

Build a text report showing the main classification metrics.

As defined by scikit-learn.

Initialize metric.

Parameters:

Name Type Description Default
features list[str] | None

The features to calculate the metric for. If None, the metric uses all features in the data.

None
Source code in src/flowcean/sklearn/metrics/classification.py
39
40
41
42
43
44
45
46
47
48
49
def __init__(
    self,
    features: list[str] | None = None,
) -> None:
    """Initialize metric.

    Args:
        features: The features to calculate the metric for. If None, the
            metric uses all features in the data.
    """
    super().__init__(features=features)

FBetaScore(*, beta=1.0, features=None)

Bases: SelectMixin, LazyMixin, Metric

F-beta score.

As defined by scikit-learn.

Initialize metric.

Parameters:

Name Type Description Default
beta float

The beta parameter.

1.0
features list[str] | None

The features to calculate the metric for. If None, the metric uses all features in the data.

None
Source code in src/flowcean/sklearn/metrics/classification.py
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
def __init__(
    self,
    *,
    beta: float = 1.0,
    features: list[str] | None = None,
) -> None:
    """Initialize metric.

    Args:
        beta: The beta parameter.
        features: The features to calculate the metric for. If None, the
            metric uses all features in the data.
    """
    super().__init__(features=features)
    self.beta = beta

PrecisionScore(features=None)

Bases: SelectMixin, LazyMixin, Metric

Precision classification score.

As defined by scikit-learn.

Initialize metric.

Parameters:

Name Type Description Default
features list[str] | None

The features to calculate the metric for. If None, the metric uses all features in the data.

None
Source code in src/flowcean/sklearn/metrics/classification.py
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
def __init__(
    self,
    features: list[str] | None = None,
) -> None:
    """Initialize metric.

    Args:
        features: The features to calculate the metric for. If None, the
            metric uses all features in the data.
    """
    super().__init__(features=features)

Recall(features=None)

Bases: SelectMixin, LazyMixin, Metric

Recall classification score.

As defined by scikit-learn.

Initialize metric.

Parameters:

Name Type Description Default
features list[str] | None

The features to calculate the metric for. If None, the metric uses all features in the data.

None
Source code in src/flowcean/sklearn/metrics/classification.py
114
115
116
117
118
119
120
121
122
123
124
def __init__(
    self,
    features: list[str] | None = None,
) -> None:
    """Initialize metric.

    Args:
        features: The features to calculate the metric for. If None, the
            metric uses all features in the data.
    """
    super().__init__(features=features)