label leakage datasets
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 755
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
Here's an example "bot" that detects label leakage:
from sklearn.tree import DecisionTreeClassifier
from sklearn.preprocessing import Imputer
import openml
# get all classification tasks
tasks = openml.tasks.list_tasks(task_type_id=1)
# get all "small" datasets that are used for classification
dids = set()
for tid, task in tasks.items():
if task['NumberOfFeatures'] * task['NumberOfInstances'] < 10000:
dids.add(task['did'])
for did in dids:
try:
ds = openml.datasets.get_dataset(did)
X, y = ds.get_data(target=ds.default_target_attribute)
except:
print("error")
X = Imputer().fit_transform(X)
n_classes = int(float(ds.qualities['NumberOfClasses']))
if n_classes == -1:
continue
acc = DecisionTreeClassifier(max_leaf_nodes=n_classes).fit(X, y).score(X, y)
if acc > .99:
print(did, acc)
results:
480 1.0
694 1.0
759 1.0
778 1.0
818 1.0
874 1.0
880 1.0
885 1.0
951 1.0
965 1.0
969 1.0
1121 1.0
1167 1.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests. Start with the provided Python example and dataset IDs 480, 694, 759, 778, 818, 874, 880, 885, 951, 965, 969, 1121, and 1167; inspect their metadata and feature/target relationships, then clarify whether done means detection, correction, or documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100