Skip to content

Document Iris dataset provenance, species encoding and units - #193

Open
fryfryfryfryfry wants to merge 1 commit into
EpistasisLab:masterfrom
fryfryfryfryfry:iris-provenance-metadata
Open

fryfryfryfryfry wants to merge 1 commit into
EpistasisLab:masterfrom
fryfryfryfryfry:iris-provenance-metadata

Conversation

@fryfryfryfryfry

Copy link
Copy Markdown

Summary

Replace placeholder Iris metadata with its UCI source, Fisher publication, feature units and species encoding. No dataset values or software behavior are changed.

Source verification

Checked current PMLB master at 7c1f4bd against the UCI iris.data release. Both contain 150 rows, 50 per species. A multiset comparison of all four float-valued measurements plus the encoded target matched exactly, preserving duplicate multiplicities while allowing row reordering.

Sources:

Verification script (Python standard library):

import urllib.request,gzip,csv,io,collections,json
a=urllib.request.urlopen('https://media.githubusercontent.com/media/EpistasisLab/pmlb/master/datasets/iris/iris.tsv.gz').read()
p=list(csv.DictReader(io.StringIO(gzip.decompress(a).decode()),delimiter='\t'))
u=urllib.request.urlopen('https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data').read().decode()
r=[x for x in csv.reader(io.StringIO(u)) if x]
mapping={'Iris-setosa':0,'Iris-versicolor':1,'Iris-virginica':2}
keys=['sepal-length','sepal-width','petal-length','petal-width']
pc=collections.Counter(tuple(float(x[k]) for k in keys)+(int(x['target']),) for x in p)
uc=collections.Counter(tuple(map(float,x[:4]))+(mapping[x[4]],) for x in r)
print(json.dumps({'pmlb_rows':len(p),'uci_rows':len(r),'multiset_match':pc==uc,'targets':dict(collections.Counter(x['target'] for x in p))}))
assert len(p)==150 and pc==uc

An earlier preparation run also validated metadata against the upstream schema after removing trailing commas from its JSON representation; upstream CI remains authoritative. The public dataset source identifies CC BY 4.0; this PR changes metadata only and does not change PMLB's license.

Disclosure and scope

AI-assisted preparation, independent automated source verification, and submission with the account owner's authorization. This is a provenance/annotation contribution, not a new machine-learning result or a claim of institutional collaboration. Maintainer review is requested. No claim of acceptance or passing upstream CI is made.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant