histogram
Histogram feature types.
Classes:
| Name | Description |
|---|---|
HistogramFeature |
Feature representing a histogram-based data distribution. |
HistogramFeature
#
Feature representing a histogram-based data distribution.
This feature encodes the statistical distribution of values through histogram bins. It can be used to summarize numerical data, such as activation distributions, probability outputs, or pixel intensity histograms in an image.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
tuple[str, ...]
|
Names of the histogram bins. Each entry typically corresponds to a range or label describing the data segment represented by the bin. |
required |
|
list[float] or None
|
Numerical values representing the histogram counts or frequencies for each bin. |
None
|
Methods:
| Name | Description |
|---|---|
to_model |
Convert to a |
from_model |
Instantiate from a json response. |
Attributes:
| Name | Type | Description |
|---|---|---|
bin_names |
tuple[str, ...]
|
|
bins |
list[float] | None
|
|
name |
Literal['HISTOGRAM']
|
|
bin_names: tuple[str, ...]
#
bins: list[float] | None = None
#
name: Literal['HISTOGRAM'] = 'HISTOGRAM'
#
to_model() -> HistogramFeatureType
#
Convert to a HistogramFeatureType instance.
Returns:
| Type | Description |
|---|---|
HistogramFeatureType
|
A feature model representation including the bin names and bin values. |
Source code in src/xpdeep/dataset/feature/feature_types/histogram.py
from_model(feature_type_input: HistogramFeatureType) -> HistogramFeature
#
Instantiate from a json response.