mp1 - Machine
Program
1


Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Machine
Program
1
 Due
October
29th
by
midnight
via
e‐mail
 Read
the
instructions
carefully
and
clarify
your
doubts
if
you
have
any.
 For
this
assignment
you
will
implement
a
Perceptron
using
the
Widrow‐Hoff
delta
 rule
and
epoch‐based
learning.
Your
program
should
be
able
to
process
training
sets
 with
arbitrary
number
of
examples
and
dimensions.
The
training
set
will
be
read
 from
the
standard
input.

 Each
training
set
will
be
formatted
in
the
following
way:

 •
In
the
first
line
a
single
integer
“n”
represents
the
dimensions
(number
of
 features)
of
the
classification
problem
we
want
to
solve.
 •
The
second
line
contains
one
single
integer
“m”
representing
the
number
of
 examples
we
want
to
classify.
 •
Next
will
come
m
examples,
each
one
represented
throughout
n+1
lines.
 The
first
n
lines
of
each
example
contain
a
single
floating
point
number
each,
 representing
the
value
for
that
feature.
The
last
line
contains
either
0
or
1,
 representing
the
label
for
that
example.
 Your
program
should
be
able
to
find
a
value
for
θ
and
values
for
the
n
weights
such
 that
your
Perceptron
best
classifies
the
training
examples.

Your
program
should
 then
output
θ
and
each
of
the
weights
in
a
single
line.

This
information
should
go
to
 the
standard
output
and
NO
other
text
or
information
should
be
sent
to
the
standard
 output.
Make
sure
you
follow
the
specification
and
that
the
testing
script

award
you
 points
correctly.

 Your
program
should
produce
a
result
that
can
be
tested
using
the
python
test
script
 attached
with
this
assignment.

This
script
receives
two
parameters,
the
first
is
a
file
 containing
the
output
of
your
program
and
the
second
is
a
file
containing
the
 training
set.
This
assignment
includes
a
few
pairs
of
training
and
testing
sets
named
 trainingsetX
and
testingsetX.
You
can
use
these
examples
to
test
your
program,
but
 we
will
use
other
sets.
 The
two
lines
that
follow
will
be
used
to
test
your
program:
 ./ProgramName < trainingsetX > weights ./test.py weights testingsetX
 
 This
should
result
in
a
single
number
on
the
screen,
representing
the
accuracy
of
 your
program
on
the
testing
set.

You
are
not
allowed
to
change
the
test
script.

If
 you
encounter
difficulties,
let
me
know
as
soon
as
possible.

 You
can
submit
your
code
in
C,
C++,
Java
or
Python.
Use
of
other
languages
requires
 prior
permission
from
the
TA.

Do
all
the
coding
by
yourself,
use
no
libraries
other
 than
the
basic
ones.

 
 ...
View Full Document

This note was uploaded on 04/30/2011 for the course ECE 448 taught by Professor Levinson during the Spring '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online