Dataset#
- class empulse.datasets.Dataset(data, target, cost_matrix, instance_costs, feature_names, target_names, name, DESCR)[source]#
Container object for datasets returned by the load / fetch functions.
Returned by every
load_*/fetch_*function; also accepts these as constructor arguments if you need to build one by hand.- Parameters:
- data
pandas.DataFrame,numpy.ndarray, or any dataframe supported by narwhals Feature matrix.
- target
pandas.Series,numpy.ndarray, or any series supported by narwhals Binary classification labels.
- cost_matrix
CostMatrix Symbolic cost matrix with default values pre-filled via
set_default. The formula only uses deterministic variables.- instance_costsdict[str, numpy.ndarray] or None
Per-instance cost drivers (e.g.
{'clv': array}). Keys match the symbol names (or aliases) incost_matrix. Pass as keyword arguments toMetric:metric(y_true, y_score, **dataset.instance_costs)
Nonewhen no instance-dependent costs are available.- feature_nameslist[str]
Column names of
data.- target_nameslist[str]
Human-readable label names.
- namestr
Dataset name.
- DESCRstr
Full description of the dataset.
- data