instancespace.data.metadata
Defines data types for metadata.
These classes define types for problem instances found in the metadata.csv file.
MATRIX_DIMENSIONS =
2
@dataclass(frozen=True)
class
Metadata:
Metadata for problem instances.
Metadata( feature_names: list[str], algorithm_names: list[str], instance_labels: pandas.core.series.Series, instance_sources: pandas.core.series.Series | None, features: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]], algorithms: numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]])
Parse metadata from a CSV file and construct a Metadata object.
Parameters
- file_path (Path | str): The path to the CSV file containing the metadata.
Returns
- Metadata or None: A Metadata object constructed from the parsed CSV data, or None if an error occurred during file reading or parsing.
Raises
- FileNotFoundError: If the specified file does not exist.
- pandas.errors.EmptyDataError: If the specified file is empty.
- pandas.errors.ParserError: If the specified file is not a valid CSV file.