In this lab you will learn how to use the Pyro module called Conx to experiment with neural networks. You will be doing a number of short exercises to get a sense of what functionality is available in Conx. Then you will reproduce the compression experiment mentioned in Chapter 4 of Mitchell's Machine Learning and you will also reproduce the letter sequences experiment described in Elman's article Finding structure in time.
Your first project, which starts next week, will involve using Conx to conduct a larger experiment. So take the time now to learn about all of the features available in Conx.
/usr/local/pyro/brain/conx.py
export PYTHONPATH=/usr/local:/usr/local/pyroThen you'll need to execute your updated .bashrc by doing:
source .bashrcAny new shell you open will now include this environment variable.
class MySRN(SRN): def sweep(self):Copy the sweep method from the SRN class definition in the conx.py file. Make sure you don't get the sweep method from the Network class by accident.
unitErrors = map(abs, self.getLayer('output').error) sumError = 0 for index in range(len(unitErrors)): sumError += unitErrors[index] print "Unit", index, "error:", unitErrors[index] print "Total error", sumError