Wednesday 4 April 2018

Further Experiments in Teaching Neural Networks

The basis of this idea was inspired by some work that can be found in the paper Varley et al (2005). The idea is to use spreadsheets as a tool for teaching neural networks. These approaches were developed for the teaching of these approaches and the videos were recorded in a class whilst teaching the concept. Both Excel and Google Sheets have been tried in all three of the approaches.

1. Creating a single neuron
The idea was to use a spreadsheet to replicate the neuron. The idea was to get the students to build the neuron step by step, starting with the inputs, then the weights, then the weighted sum and threshold for a simple neuron. Personally, I like the approach for two reasons; firstly the concept that only a single set of weights is used is sneaked in, the second is builds all the stages up gradually and visually.
Video below shows the building of the model and it's use. 



2. Training a single neuron.
This approach extends the ideas from the approach above, quickly building a single neuron, but expands into training a neuron. Cutting and pasting the blocks to show the idea of epochs.

Training is via the delta rule (change in the weight [x] = learning coefficient * input [x] * (what output we wanted - actual output from the neuron). I like the approach because it seems to show the weights being arrived at in a very mechanical way by repeating actions -  machine learning is not magic!

The video below shows the stages.



3. Building a simple Neural Network

Previously only a single neuron was produced. In this approach, the ideas from build a neuron in Excel activity are extended to three neurons connected in the same worksheet. The exercise then connects the outputs from two neurons (which have a common input) as the inputs of a third neuron building an XOR gate (which a single simple neuron can not implement). The video below shows all of the stages.


 




4. Where next?

It would be nice to extend the idea further to have the training of a simple neural network above. If anyone manages this please add the link into the comments.


Bibliography
VARLEY, M; PEAK, M; HEYS, J; COLLINS, G; KONSTANTARAS A,  VALLIANATOS, F; PICTON P (2005) Spreadsheet Software as a Teaching Tool for Concepts in Electronic Engineering, [Online] http://www.wseas.us/e-library/conferences/2005athens/ee/papers/507-162.pdf accessed on: 20/2/2016

Turner, S. J. (2017) Experience of using spreadsheets as a bridge in the understanding of AI techniques. Paper presented to: 13th China Europe Symposium on Software Engineering Education (CEISEE), Athens, Greece, 24-25 May 2017.


All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with

All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruon

No comments:

Post a Comment