Docsity

Artificial Intelligence Lab: Iris Data Set and Neural Network Training - Prof. James J. Fu, Lab Reports of Computer Science

Toggle sidebar
bg1
ArtificialIntelligenceLab3
Fisher’sIrisDataisoneofthemorefamousdatasetsinmodeling.Theinputvariablesinthefirstfour
columnsarearesepallength,sepalwidth,petalwidth,andpetallength.Therearethreedifferent
typesofiris:setosa,versicolor,andvirginica.
Thelasttwocolumnsaredesiredoutputforthebackpropagationneuralnetwork.
1. Therearetwooutputneurons
2. Forasetosairis,wewantbothneuronstorespond0
3. Foraversicoloriris,wewantthefirstneurontorespond0andthesecondtorespond1
4. Foravirginicairis,wewantthefirstneurontorespond1andthesecondtorespond0.
5.1 3.5 1.4 0.2 Iris -setosa 0 0
4.9 3.0 1.4 0.2 Iris -setosa 0 0
4.7 3.2 1.3 0.2 Iris -setosa 0 0
4.6 3.1 1.5 0.2 Iris -setosa 0 0
5.0 3.6 1.4 0.2 Iris -setosa 0 0
5.4 3.9 1.7 0.4 Iris -setosa 0 0
4.6 3.4 1.4 0.3 Iris -setosa 0 0
5.0 3.4 1.5 0.2 Iris -setosa 0 0
…
7.0 3.2 4.7 1.4 Iris -versicolor 0 1
6.4 3.2 4.5 1.5 Iris -versicolor 0 1
6.9 3.1 4.9 1.5 Iris -versicolor 0 1
5.5 2.3 4.0 1.3 Iris -versicolor 0 1
6.5 2.8 4.6 1.5 Iris -versicolor 0 1
5.7 2.8 4.5 1.3 Iris -versicolor 0 1
6.3 3.3 4.7 1.6 Iris -versicolor 0 1
4.9 2.4 3.3 1.0 Iris -versicolor 0 1
…
6.3 3.3 6.0 2.5 Iris-virginica 1 0
5.8 2.7 5.1 1.9 Iris-virginica 1 0
7.1 3.0 5.9 2.1 Iris-virginica 1 0
6.3 2.9 5.6 1.8 Iris-virginica 1 0
6.5 3.0 5.8 2.2 Iris-virginica 1 0
7.6 3.0 6.6 2.1 Iris-virginica 1 0
4.9 2.5 4.5 1.7 Iris-virginica 1 0
7.3 2.9 6.3 1.8 Iris-virginica 1 0
6.7 2.5 5.8 1.8 Iris-virginica 1 0
…
Dothefollowingstepstocompletethelab
1. Downloadthefileiris.datfromtheclasswebsite
2. UseNetMakertoreadinthedataset
3. Markthefirstfourcolumnsasinput(CTRL‐i)
4. MarkthetextasAnnotate(CTRL‐a)
pf2

Partial preview of the text

Download Artificial Intelligence Lab: Iris Data Set and Neural Network Training - Prof. James J. Fu and more Lab Reports Computer Science in PDF only on Docsity!

Artificial Intelligence Lab 3

Fisher’s Iris Data is one of the more famous data sets in modeling. The input variables in the first four columns are are sepal length, sepal width, petal width, and petal length. There are three different

types of iris: setosa, versicolor, and virginica.

The last two columns are desired output for the back propagation neural network.

  1. There are two output neurons
  2. For a setosa iris, we want both neurons to respond 0
  3. For a versicolor iris, we want the first neuron to respond 0 and the second to respond 1
  4. For a virginica iris, we want the first neuron to respond 1 and the second to respond 0.

5.1 3.5 1.4 0.2 Iris -setosa 0 0 4.9 3.0 1.4 0.2 Iris -setosa 0 0 4.7 3.2 1.3 0.2 Iris -setosa 0 0 4.6 3.1 1.5 0.2 Iris -setosa 0 0 5.0 3.6 1.4 0.2 Iris -setosa 0 0 5.4 3.9 1.7 0.4 Iris -setosa 0 0 4.6 3.4 1.4 0.3 Iris -setosa 0 0 5.0 3.4 1.5 0.2 Iris -setosa 0 0 …

7.0 3.2 4.7 1.4 Iris -versicolor 0 1 6.4 3.2 4.5 1.5 Iris -versicolor 0 1 6.9 3.1 4.9 1.5 Iris -versicolor 0 1 5.5 2.3 4.0 1.3 Iris -versicolor 0 1 6.5 2.8 4.6 1.5 Iris -versicolor 0 1 5.7 2.8 4.5 1.3 Iris -versicolor 0 1 6.3 3.3 4.7 1.6 Iris -versicolor 0 1 4.9 2.4 3.3 1.0 Iris -versicolor 0 1

…

6.3 3.3 6.0 2.5 Iris-virginica 1 0 5.8 2.7 5.1 1.9 Iris-virginica 1 0 7.1 3.0 5.9 2.1 Iris-virginica 1 0 6.3 2.9 5.6 1.8 Iris-virginica 1 0 6.5 3.0 5.8 2.2 Iris-virginica 1 0 7.6 3.0 6.6 2.1 Iris-virginica 1 0 4.9 2.5 4.5 1.7 Iris-virginica 1 0 7.3 2.9 6.3 1.8 Iris-virginica 1 0 6.7 2.5 5.8 1.8 Iris-virginica 1 0 …

Do the following steps to complete the lab

  1. Download the file iris.dat from the class website
  2. Use NetMaker to read in the data set
  3. Mark the first four columns as input (CTRL‐i)
  4. Mark the text as Annotate (CTRL‐a)
  1. Mark the last two columns as patterns (CTRL‐p)
  2. Have the Brain Maker software try to learn all of the data. a. Start with 10 neurons in the hidden layer b. Record the fewest number of errors the network made c. Record the smallest number of hidden neurons that allowed you to achieve the smallest number of incorrect responses.

Lab Part II

  1. Download wine.dat from the website.
  2. Use the menus to reserve 20% of the data for testing
  3. Train the neural network. What percentage did you get correct during training?
  4. Test the neural network. What percentage did you get correct during testing?