Experimenting with Neural Nets Numbers marked with indicate material you need to write up.

Similar documents
RECTILINEAR MOVEMENT

Artificial Neural Networks Exercise

Supervised Learning in Neural Networks (Part 2)

Creating Breakout - Part 2

Patterning Math Lab 4a

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version):

Recipes4Success. Animate Plant Growth. Share 4 - Animation

Pre-Lab Excel Problem

Microsoft Excel 2007 Lesson 7: Charts and Comments

GeoVISTA Studio Tutorial. What is GeoVISTA Studio? Why is it part of the map making and visualization workshop?

L E S S O N 2 Background

Motion I. Goals and Introduction

Computer Essentials Session 1 Step-by-Step Guide

Installing VPN client by Jupiter Networks:

Using Flash Animation Basics

Graphic Design & Digital Photography. Photoshop Basics: Working With Selection.

CS311 - Neural Nets Lab Thursday, April 11

INTRODUCTION TO THE MATLAB APPLICATION DESIGNER EXERCISES

CSC321: Neural Networks. Lecture 13: Learning without a teacher: Autoencoders and Principal Components Analysis. Geoffrey Hinton

Table Basics. The structure of an table

Chapter 11 Dealing With Data SPSS Tutorial

3/31/2016. Spreadsheets. Spreadsheets. Spreadsheets and Data Management. Unit 3. Can be used to automatically

TUTORIAL - COMMAND CENTER

1 Getting started with Processing

Adobe Illustrator. Quick Start Guide

UV Mapping to avoid texture flaws and enable proper shading

Section Graphs of the Sine and Cosine Functions

Designing & Creating your GIS Poster

Creating Vector Shapes Week 2 Assignment 1. Illustrator Defaults

CS/NEUR125 Brains, Minds, and Machines. Due: Wednesday, April 5

The Mathematics Behind Neural Networks

HOUR 12. Adding a Chart

Creating Interactive PDF Forms

I will show you how to Brighten or Darken in the Effects. As I mentioned in Part 1, I decided to do that in this Part vs. the Part 1, because if I

Lesson 5 Styles, Tables, and Frames

252 APPENDIX D EXPERIMENT 1 Introduction to Computer Tools and Uncertainties

ENV Laboratory 2: Graphing

For Monday. Read chapter 18, sections Homework:

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Spreadsheet Concepts: Creating Charts in Microsoft Excel

Introduction to Motion

Due on: May 12, Team Members: Arpan Bhattacharya. Collin Breslin. Thkeya Smith. INFO (Spring 2013): Human-Computer Interaction

Chapter 1: Introduction to the Microsoft Excel Spreadsheet

S A M P L E C H A P T E R

Logger Pro Resource Sheet

DOING MORE WITH POWERPOINT: MICROSOFT OFFICE 2013

Assignment 3 due Thursday Oct. 11

Transforming Selections In Photoshop

Adobe Illustrator CS5 Part 2: Vector Graphic Effects

Creating & Modifying Tables in Word 2003

Technology Assignment: Scatter Plots

Premiere - Jazz Video Project Tutorial

Creating a Title Block & Border Using Chief Architect. Architectural Design & Residential Construction Penncrest High School

Course on Artificial Intelligence and Intelligent Systems

Alibre Design Tutorial - Simple Revolve Translucent Glass Lamp Globe

PA Payroll Exercise for Intermediate Excel

Excel 2010: Basics Learning Guide

To use the keyboard emulation, you must activate it in the tray icon menu (see 2.6 Enable keyboard emulation)

Microsoft Access 2016 Intro to Forms and Reports

GUIDED NOTES 3.5 TRANSFORMATIONS OF FUNCTIONS

Microscopic Measurement

DeskCNC setup and operation manual

Technology Assignment: Limits at Infinity

Windows 8.1. Tiles come in four shapes: small, medium, wide, and large. The red outlined tiles are live tiles.

How to Prepare Your Cards for Press Using InDesign

What s New to Version 2.0

FRC LabVIEW Sub vi Example

POWERPOINT BASICS: MICROSOFT OFFICE 2010

Severe Weather Safety PSA

Spreadsheet and Graphing Exercise Biology 210 Introduction to Research

Multimedia web page Board

Photoshop Goodies Phil Russell

Get comfortable using computers

Photoshop tutorial: Final Product in Photoshop:

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming

Beginning Tutorial the Lego

DOING MORE WITH WORD: MICROSOFT OFFICE 2013

Does the Brain do Inverse Graphics?

Access Review. 4. Save the table by clicking the Save icon in the Quick Access Toolbar or by pulling

How to Make a Sign. Eagle Plasma LLC. Accessing the included step by step.dxf files

Chapter One Modifying Your Fonts

Customizing FlipCharts Promethean Module 2 (ActivInspire)

The major change in Word is the ribbon toolbar. The File menu has been replaced with a button.

Week 5 Creating a Calendar. About Tables. Making a Calendar From a Table Template. Week 5 Word 2010

Overview of Synaptics TouchPad Features

Physics 251 Laboratory Introduction to Spreadsheets

Designing & Creating your GIS Poster

1. Navigation and menus

Electronic Portfolios in the Classroom

CSC 101: Lab #5 Prelab Boolean Logic Practice Due Date: 5:00pm, day after lab session

2/22/ Transformations but first 1.3 Recap. Section Objectives: Students will know how to analyze graphs of functions.

STIPlotDigitizer. User s Manual

Excel Tutorial. Look at this simple spreadsheet and then answer the questions below.

CS 4510/9010 Applied Machine Learning. Neural Nets. Paula Matuszek Fall copyright Paula Matuszek 2016

EXCEL SPREADSHEET TUTORIAL

New and Improved Formula Editor in JMP 13

Here is the data collected.

Using Microsoft Excel

How to use Excel Spreadsheets for Graphing

Studying in the Sciences

Transcription:

CSC 325 / PHI 394 Spring 2011 - Homework Experimenting with Neural Nets Numbers marked with indicate material you need to write up. BEFORE YOU BEGIN Download the Java Neural Net Simulator (JavaNNS) from: http://www.ra.cs.uni-tuebingen.de/software/javanns/welcome_e.html For Windows, you download extract the contents of the JavsNNS-Win.zip file. To run the program, double click on the JavaNNS.jar file. Note: remember, in this program neurons are called units. Practice 1: Training a pre-built neural net to recognize Even/Odd patterns ( Parity )_ 1. Download the network (.net) and pattern (.pat) files for this assignment from the class website. 2. Double-click on JavaNNS.jar file to launch the neural network simulator. 3. Pull down the File menu, and select Open Click up and over to the folder NKU_examples Choose the file Network_4_12_1.net (from the course website). 4. A neural network should appear in a window. Resize the window to see all of it. 5. Pull down the View menu, and select Weights. 6. Pull down the View menu again, and select Error Graph. 7. Pull down the Tools menu, and select Control Panel. 8. Drag and resize these windows to make sure you can see them well. Resize the enclosing window if necessary. 9. Click on the bottom right [>] button on the error graph several times until the last number on the horizontal axis is 10,000. You might want to stretch the window out to make it wider. (See picture below.) Also, click on the second button in the lower left corner to turn on the grid. 10. Click on the [V] button on upper left of the error graph several times until the last number on the vertical axis is 5. (See picture below.) 1

11. Pull down the File menu, and select Open Choose the file Parity4.pat (which you downloaded from the course website). 12. On the Control Panel, choose the Initializing tab, and click the Init button. This will set the weights to their initial values. By default, the weights will be random, between -1 and +1. You can see them displayed, color code, in the Linkweights window. (The square in column 3 row 15 is indicates the weight from neuron 3 to neuron 15, for example.) 13. See how the neural network classifies patterns before it has learned anything. Go to the Updating tab of the Control Panel. Click through the 16 input patterns, and see how the neural network responds. Note that the output neuron will never produce a 0 or a 1 as an output. Why? Let s say that if the neuron produces an output > 0.9 when it should say 1, and < 0.1 when it shoul;d say 0, that is good enough. If the neural net understood even vs. odd, the following should happen: When the number of green inputs is even, the output neuron should be blue. When the number of green inputs is odd, the output neuron should be green. But it doesn t understand this yet! Its brain has just random connections. So we must train it! 2

14. Go to the Learning tab. Set Cycles to 10000 (this is the number of passes through the training set to use). Then click Learn All. Watch the error curve go down (we hope!!) If it the learning curve doesn t go down to (almost) zero, try it again: Hit Init to reset all the synaptic weights to random values. Hit Learn All and watch the learning curve. Hopefully it goes down! (You can hit the clear button in lower left corner of the Error graph window to erase older graphs.) Do this ten times. Record approximately how many passes ( cycles ) it took before it learned, in a table like this example: Pass Number of cycles (write >10K if it did not get near 0 before reaching 10,00 0 cycles) 1 9500 2 6500 3 >10K etc. Just do this visually by watching the error graph curves. There is no point in having precise numbers. Why is there such a range of different learning times? 15. After doing a run where the net successfully learned, walk through the training set (as in step 13) and confirm that it is now getting the answers right. Watch the hidden layers. For how many of the 16 input patterns are the hidden neurons exclusively high or low (>0.9 or <0.1)? Can you make other observations about how input patterns are represented in the hidden layer? 16. Time for brain damage! Making sure you have a network that has learned parity, go to the network widow and right-click on the first (top) hidden neuron, and select delete. Now walk through the training set again. How many of the 16 patterns does it correctly classify now? When it has an answer wrong, is it slightly wrong (for example, saying 0.8 when it should be >0.9) or totally misclassified? Now delete another hidden neuron, and answer the same question. Now delete a third hidden neuron, and answer the same question. 17. At this point, our little brain has suffered a massive stroke: it has lost 3 of its 12 hidden neurons. Can it recover from this trauma with a little therapy? Let s see if it can learn the problem with its smaller brain. Retrain it: Hit Learn All, and watch the learning curve. Does it learn? 18. Free experimentation: What s the smallest brain that can learn this even/odd problem? Write up your findings carefully and clearly. Notice you will need to do many experiments, as there is a lot of random variation here. 3

Practice 2: Building your own network Now you will build your own network to solve the (harder) 5-parity problem. 1. From the File menu pull down New. You do not need to save anything. 2. Pull down the Tools menu, and select Create > Layers. 3. Build the input layer, as follows, selecting a height of 5 neurons of type Input. Then hit Create. 4. Build a hidden layer, as follows, selecting a height of 12 neurons of type Hidden, with top left position 4. Then hit Create. 5. Build another hidden layer of 12 hidden neurons, as you did above, with top left position 7. 6. Finally, build the output layer, selecting a height of 1 neuron of type Output, with top left position 10. 4

7. Those are the neurons, now we need to build the connections. In the Tools menu, pull down Create Connection. In the box that pops up select Connect feed-forward, then hit the Connect button. Your network should look like the one on the right below: 8. Save this to a file. A good name for it would be Network_5_12_12_1.net 9. Now you can train this network on the 5-parity problem (opening parity5.pat) as you did in the first exercise. This is a harder problem, so give it 100,000 cycles to learn it. Also, change the horizontal scale on the Error graph to 0 100,000 and the vertical scale to 0 10, so you can see the learning curves clearly. Replicate the table you did for #14 in Practice 1. After experimenting with Backpropagation (on the Learning tab), try out Backprop-momentum, experimenting with parameters to try and get it to learn. Congratulations, you are doing neural smithing! Write up your experimental results and any conclusions you have reached. 5