Skip to content

Commit

Permalink
more experiments on real-world data added
Browse files Browse the repository at this point in the history
  • Loading branch information
kbudhath committed Feb 15, 2017
1 parent b441599 commit cd1815e
Show file tree
Hide file tree
Showing 11 changed files with 48,134 additions and 11 deletions.
4,178 changes: 4,177 additions & 1 deletion data/abalone/abalone.dat

Large diffs are not rendered by default.

4,177 changes: 4,177 additions & 0 deletions data/abalone/abalone.data

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions data/abalone/convert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env python

import csv

si = 0
li = 1
di = 2
hi = 3

fp = open("abalone.dat", "w")

with open("abalone.data", "r") as csvfile:
reader = csv.reader(csvfile, delimiter=",")

for row in reader:
sex, length, diameter, height = row[si], row[li], row[di], row[hi]
if sex == "M":
sex = 1
elif sex == "F":
sex = 2
else:
sex = 3
fp.write("%d %s %s %s\n" % (sex, length, diameter, height))

fp.close()

Loading

0 comments on commit cd1815e

Please sign in to comment.