pixano.datasets.dataset_stat
DatasetStatistic(**data)
Bases: BaseModel
A statistic of a dataset.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
The name of the statistic. |
type |
str
|
The type ('numerical' or 'categorical') of the statistic. |
histogram |
list[dict[str, float | int | str]]
|
The histogram of the statistic. |
range |
list[int | float] | None
|
The range of the statistic. |
Source code in pydantic/main.py
from_json(json_fp)
staticmethod
Read list of DatasetStatistic from a JSON file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_fp
|
Path
|
JSON file path. |
required |
Returns:
| Type | Description |
|---|---|
list[DatasetStatistic]
|
A list of |
Source code in pixano/datasets/dataset_stat.py
to_json(json_fp)
Save DatasetStatistic to a json file.
Replace the existing histogram in json_fp.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_fp
|
Path
|
Save directory. |
required |