{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# SYDE556/750 Assignment 4: Nengo and Dynamics\n", "\n", "- Due Date: March 31st at dawn (7:06am)\n", "- Total marks: 10 (10% of final grade)\n", "- Late penalty: 1 mark per day\n", "\n", "- For this assignment, you must use Nengo, which can be downloaded from http://nengo.ca. \n", " - Click here to download the most recent version\n", " - To install Nengo, download the file from the above link and unzip it. If you are using Linux or OS X, double-click on `nengo`. If you are using Windows, double-click on `nengo.exe` (or, if that doesn't work, `nengo.bat`).\n", " - Nengo requires Java to run.\n", "- For a tutorial on how to use Nengo, see http://nengo.ca/docs/html/tutorial.html\n", " - You can either use the drag-and-drop interface (http://nengo.ca/docs/html/tutorial.html) or the scripting interface (http://nengo.ca/docs/html/scripting.html)\n", " - It is highly recommended that you look through the tutorials before doing this assignment.\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1) Building an ensemble of neurons\n", "\n", "Make a new network, and inside that network make a group of neurons (in Nengo, this is called an \"Ensemble\" of neurons). It should have 100 neurons, and represent a 1-dimensional space. The intercepts should be between -1 and 1, and the maximum firing rates should be between 100Hz and 200Hz. $\\tau_{RC}$ should be 0.02s and $\\tau_{ref}$ should be 0.002s.\n", "\n", "- a) [1 mark] Show the \"Constant Rate Responses\" (the tuning curves) plot and the \"Distortion\" (representation accuracty) plot. These are accessed by right-clicking on the ensemble and choosing \"Plot\". Report the MSE (as indicated by the \"Distortion\" plot).\n", "- b) [1 mark] What happens to the MSE as the radius increases? Why? (Note: Nengo will automatically rescale the intercepts as the radius increases)\n", "- c) [0.5 marks] What happens to the MSE and the tuning curves as $\\tau_{ref}$ changes? Why?\n", "- d) [0.5 marks] What happens to the MSE and the tuning curves as $\\tau_{RC}$ changes? Why?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2) Connecting neurons\n", "\n", "Make a second ensemble of neurons. It should have the same parameters as the first ensemble of neurons (from the first question), but have only 50 neurons in it. Connect the first ensemble to the second such that it computes the identity function, using a post-synaptic time constant of 0.01. Create an input that is a value of 1 for when $0.10.1)*(x0<0.4)` as the Expression. (In this case, we are defining a function of time, and `x0` is the current time).\n", "- To create the input using scripting, you can do `net.make_input('input', lambda t: 1 if 0.10.45). In the GUI, this is done with a User-defined function of `2*x0*(x0<0.45)` and in the scripting this is done with `net.make_input('input', lambda t: 2*t if t<0.45 else 0)`. Show the same plots as in the previous parts of this question. What does the ensemble end up representing, and why? What is the (ideal) equation for the curve traced out by the ensemble?\n", "- e) [1 mark] Change the input to `5*sin(5*t)` (for specifying this in the GUI, this would be `5*sin(5*x0)`). What should be the value represented by the ensemble (write the equation)? How well does it do? What are the differences between the model's behaviour and the expected ideal behaviour?\n" ] } ], "metadata": {} } ] }