技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
datasets-and-metrics【数据与研究】Use AIF360 legacy dataset containers and fairness metric classes for tabular protected-group analysis.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about AIF360's legacy dataset objects and metric classes: constructing StructuredDataset, BinaryLabelDataset, StandardDataset, or RegressionDataset instances; loading legacy raw-dataset wrappers; defining privileged/unprivileged protected groups; and computing dataset, classification, regression, sample-distortion, or MDSS classification metrics.
DataFrame; pass label_names, protected_attribute_names, and explicit favorable_label/unfavorable_label when labels are not 1.0/0.0.AdultDataset, GermanDataset, CompasDataset, BankDataset, MEPSDataset19/20/21, or LawSchoolGPADataset; legacy wrappers are not safe smoke tests because public raw files may be absent or network-bound.BinaryLabelDatasetMetric for one true dataset, ClassificationMetric for true-vs-predicted BinaryLabelDataset pairs, SampleDistortionMetric for original-vs-distorted StructuredDataset pairs, RegressionDatasetMetric for ranked regression datasets, and MDSSClassificationMetric only when a classification metric object must score a known group.privileged_groups and unprivileged_groups as lists of dictionaries keyed by dataset.protected_attribute_names; the dictionary values must match the encoded numeric protected attributes.python scripts/metric_report_smoke.py --pretty from this sub-skill directory, or pass its path to a Python interpreter from another working directory.fit, transform, predict, postprocessing thresholds, or algorithm selection after metric diagnosis, route to mitigation-algorithms.aif360.sklearn.datasets.fetch_*, protected attributes in pandas indexes, sklearn scorers, or sklearn pipelines, route to sklearn-interface.MDSSClassificationMetric.score_groups, or metric text/JSON explainers, route to detectors-and-explainers.aif360 imports and note that base dataset/metric workflows are CPU-only.BinaryLabelDataset examples first.dataset.protected_attribute_names, dataset.privileged_protected_attributes, and dataset.unprivileged_protected_attributes before constructing metric group dictionaries.ClassificationMetric, make the predicted dataset by deep-copying the true dataset and changing only labels and optionally scores; otherwise equality validation will fail.