Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2341738

Browse files
committed
Fixed issue 6.
1 parent e3771ae commit 2341738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def __init__(self, examples=None, attrs=None, target=-1, values=None,
4141
self.examples = parse_csv(DataFile(name+'.csv').read())
4242
else:
4343
self.examples = examples
44-
map(self.check_example, self.examples)
4544
# Attrs are the indices of examples, unless otherwise stated.
4645
if not attrs and self.examples:
4746
attrs = range(len(self.examples[0]))
@@ -68,6 +67,7 @@ def setproblem(self, target, inputs=None, exclude=()):
6867
if a is not self.target and a not in exclude]
6968
if not self.values:
7069
self.values = map(unique, zip(*self.examples))
70+
map(self.check_example, self.examples)
7171

7272
def add_example(self, example):
7373
"""Add an example to the list of examples, checking it first."""

0 commit comments

Comments
 (0)