SlideShare une entreprise Scribd logo
1  sur  9
Télécharger pour lire hors ligne
Data mining
‘Epochs & Accuracy’

~ Using the MultiLayerPerceptron function on a deliverd database ~




                        COMPUTER ASSIGNMENT 3

                        BARRY KOLLEE

                        10349863
Computerassignment 3


Exercise 1a): In the GUI screen you need to adjust the epochs (500 is too much). Start by
choosing 5. Select Start. Select Accept. The output screen gives you the accuracy of the
learned model.

I’ve loaded up the soybean.arff file into weka and did the following:
      •   Used the MultiLayerPerceptron classifier
      •   Set training set under test options
Set GUI on true

I performed the MultiLayerPerceptron with an Epoch of 5. The accuracy of an epoch of 5 (5 iterations) is
given in red.

Epoch of 5


    Correctly Classified Instances                       534            78.1845 %
    Incorrectly Classified Instances                     149            21.8155 %


Info about this evaluation

    Epoch = 5
    Error per Epoch = 0.0164204
    Learning Rate = 0.3
    Momentum = 0.2




Exercise 1b): Repeat the training with different settings (epochs 5, 10, 50 and 100) and see
what happens to the performance.


Epoch set to 10

    Correctly Classified Instances                        638           93.4114 %
    Incorrectly Classified Instances                       45            6.5886 %


Info about this evaluation

    Epoch = 10
    Error per Epoch = 0.0068437
    Learning Rate = 0.3
    Momentum = 0.2




Epoch set to 50


    Correctly Classified Instances                       674            98.6823 %
    Incorrectly Classified Instances                       9             1.3177 %



Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0004657
    Learning Rate = 0.3
    Momentum = 0.2




2
Computerassignment 3


Epoch set to 100

    Correctly Classified Instances                 679                    99.4143 %
    Incorrectly Classified Instances                 4                     0.5857 %


Info about this evaluation

    Epoch = 100
    Error per Epoch = 0.0002785
    Learning Rate = 0.3
    Momentum = 0.2



Now we place all our findings of the different epochs into one table. Then it becomes clear which epoch
gives us the highest accuracy. The learning rate within the underneath table has been set to 0.3.


              Number of Epochs/iterations                Accuracy (number of correct classified instances)

                            5                                               78.1845 %
                           10                                               93.4114 %
                           50                                               98.6823 %
                           100                                              99.4143 %

It becomes clear that, when we increase the number of epochs (iterations), the accuracy climbs up also.
The increasing of the accuracy is mostly occurring when the epoch (number of iterations) is between 1
and 10. When we increase the number epochs to a value which is higher then 10, then there’s a
significant lower increase of the accuracy. The percentage of incorrect classified instances, when using
100 as the input value of Epoch, has been decreased to 0.5657 %. So that might be ‘negligbible’. In
conclusion we can state that using higher values for epoch wouldn’t be necessary with this learning rate.

If we also check the tables with ‘info about this evaluation’ we can also see that the error per epoch has
been decreased significantly when we increased the number of epoch(s).




3
Computerassignment 3


Exercise 2: Pick one epoch value, and start playing with the "learning rate" parameter, e.g. try
0.1, 0.3, and 0.6. Again, look for each value what happens to the accuracy.

I’ve chosen for using an epoch value of 10 within the three outputs listed below. The accuracy (number
of correct and incorrect instances) is given in red.

Learning rate set to 0.1

    Correctly Classified Instances                 494                    72.328    %
    Incorrectly Classified Instances               189                    27.672    %


Info about this evaluation

    Epoch = 10
    Error per Epoch = 0.0196909
    Learning Rate = 0.1
    Momentum = 0.2




Learning rate set to 0.3

Epoch set to 10

    Correctly Classified Instances                 638                    93.4114 %
    Incorrectly Classified Instances                45                     6.5886 %


Info about this evaluation

    Epoch = 10
    Error per Epoch = 0.0068437
    Learning Rate = 0.3
    Momentum = 0.2




Learning rate set to 0.6


    Correctly Classified Instances                 638                    93.4114 %
    Incorrectly Classified Instances                45                     6.5886 %



Info about this evaluation

    Epoch = 10
    Error per Epoch = 0.0050657
    Learning Rate = 0.6
    Momentum = 0.2




Now we place our findings in a table where we put the learning rate

                      Learning rate                      Accuracy (number of correct classified instances)
                          0.1                                             72.328 %
                          0.3                                             93.4114 %
                          0.6                                             93.4114 %


We see that increasing the learning rate from 0.1 to 0.3 has affected the accuracy in a good way.
However we see that if we would increase the learning rate it’s value even more that we won’t have a
higher accuracy. It might be interesting to take a look at a learning rate of 0.2 and check if the accuracy,
when using a learning rate of 0.2, has been affected if we compare it to a learning rate of 0.1.




4
Computerassignment 3


The result of a learning set which has been set to 0.2 is listed below. The accuracy is given in red.

      Correctly Classified Instances                                                                                                     612                                                        89.6047 %
      Incorrectly Classified Instances                                                                                                    71                                                        10.3953 %



Info about this evaluation

    Epoch = 10
    Error per Epoch = 0.0112326
    Learning Rate = 0.2
    Momentum = 0.2



We see that the accuracy has climbed up significantly if we compare the learning rates of 0.1, 0.2 and
0.3.


      learning rate 0.1 = 72.328 %
      learning rate 0.2 = 89.6047 %
      89.6047 / 72.3280 ≈ 1.24 increase factor

      learning rate 0.2 = 89.6047 %
      learning rate 0.3 = 93.4114 %
      93.4114 / 89.6047 ≈ 1.04 increase factor

      learning rate 0.1 = 72.328 %
      learning rate 0.3 = 93.4114 %
      93.4114 / 89.6047 ≈ 1.29 increase factor



Another conclusion we can make is that the highest increasing factor is between a learning rate of 0.1
and 0.2. When increasing the learning rate any further is has a small effect on the accuracy of our model.

Another thing we can conclude is that the highest accuracy within this test has occurred when using a
                                                                                  1
learning rate of 0.3. We did observed a decrease of the error per epoch of 0.001 between the learning
rates 0.3 and 0.6, but that hasn’t affected the accuracy (number of correctly classified instances).




	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
1	
  See ‘info about this evaluation’ of learing rate 0.3 & 0.6. Difference between these values.
2
    Unfortunately Weka was not able to set the learning rate to a higher value then 1.0. There was a fixed maximum set



5
Computerassignment 3


Exercise 3. As a final experiment, pick one value for both epoch and learning rate, and play
with the hiddenLayers (in the same window as where you set GUI to true). The default value
is 'a', try setting it differently (e.g. 5 or 10) and try multiple values at the same time (e.g. 10,10).
Again, look at performance of the model for various settings.


For the final experiment I’ve chosen to an epoch of 50 and a learning rate of 0.2.

These are the results when the hiddenLayers feature is set to it’s default value ‘a’. The accuracy is given
in red.

    Correctly Classified Instances                673                    98.5359 %
    Incorrectly Classified Instances               10                     1.4641 %


Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0008995
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘a’



Now we set the value of hiddenLayers to 1. The output is listed below (and the accuracy in red).

    Correctly Classified Instances                 91                    13.3236 %
    Incorrectly Classified Instances              592                    86.6764 %


Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0481054
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘1’



Now we set the hiddenLayer option to 3. The accuracy is given in red again

    Correctly Classified Instances                408                    59.7365 %
    Incorrectly Classified Instances              275                    40.2635 %


Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0269675
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘3’



Now we set the hiddenLayer option to 5. The accuracy is given in red again.

    Correctly Classified Instances                478                    69.9854 %
    Incorrectly Classified Instances              205                    30.0146 %


Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0173471
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘5’




6
Computerassignment 3


Now we set the hiddenLayer value to 10. The accuracy is given in red (again):

    Correctly Classified Instances                  615                    90.0439 %
    Incorrectly Classified Instances                 68                     9.9561 %


Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0062486
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘10’



Now we set the hiddenLayers option to 20. The accuracy is given in red again.


    Correctly Classified Instances                  667                    97.6574 %
    Incorrectly Classified Instances                 16                     2.3426 %



Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.001507
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘20’



Now we do a final test to see if there’s still a significant increase within the accuracy. We set the
hiddenLayers option to 30. The results are listed below with the accuracy in red.

    Correctly Classified Instances                  672                    98.3895 %
    Incorrectly Classified Instances                 11                     1.6105 %


Info about this evaluation

    Epoch = 50
    Error per Epoch = 0.0014833
    Learning Rate = 0.2
    Momentum = 0.2
    hiddenLayers = ‘30’



We can now make a clear table where we note all accuracy’s weighted to the hiddenLayers it’s input
value. The underneath table shows us that the most significant increase of the accuracy is within 1 to 10
layers. After 20-30 hiddenLayers we have an almost perfect accuracy.


                   hiddenLayers value                     Accuracy (number of correct classified instances)

                       ‘a’ (default)                                         98.5359 %
                             1                                               13.3236 %
                             3                                               59.7365 %
                             5                                               69.9854 %
                             10                                              90.0439 %
                             20                                              97.6574 %
                             30                                              98.3895 %


I’ve also visualized the outputs. It’s becoming clear that the more hiddenLayers we put in the more
connections can me made between the input attributes and the output attributes. We see that the red
dots represents the number of hiddenLayers which we have put in.




7
Computerassignment 3




    Epoch of 1             Epoch of 3           Epoch of 10           Epoch of 20           Epoch of 30



Now we test the same number of hiddenLayers but then with a learning rate of 0.3 and we leave the
epoch as it was (50 iterations). The accuracy of these output are listed below. If we compare these
numbers to the previous table we can state that they’re pretty similar and that it’s hard to say how they
differ.	
  


                 hiddenLayers value                    Accuracy (number of correct classified instances)

                    ‘a’ (default)                                          98.6823 %
                          1                                                24.0117 %
                          3                                                55.7833 %
                          5                                                68.6676 %
                          10                                               91.8009 %
                          20                                               98.0966 %
                          30                                               98.6823 %

Now we try different settings for the hiddenLayer feature. Instead of adding one integer we add two. This
will result in 2 layers of hiddenLayers. We leave the learning rate as 0.3 and use an epoch of 50 (50
iterations) as we have used in the previous examples also. We see that we get a ‘multi layer perceptron’.




        Epoch set to 5,1                     Epoch set to 1,5                     Epoch set to 5,5




8
Computerassignment 3




                                                                                                  hiddenLayer value                                                                                                                Accuracy (number of correct classified instances)

                                                                                                                                               1,1                                                                                                     26.2079 %
                                                                                                                                               5,1                                                                                                     32.0644 %
                                                                                                                                              10,1                                                                                                     26.2079 %
                                                                                                                                               1,5                                                                                                     30.7467 %
                                                                                                                                               5,5                                                                                                     62.0791 %
                                                                                                                                              10,5                                                                                                     64.1288 %
                                                                                                                                              1,10                                                                                                     32.7965 %
                                                                                                                                              5,10                                                                                                     65.593 %
                                                                                                                                              10,10                                                                                                    71.5959 %


Now we do the same thing but we only adjust the learning rate to 0.6


                                                                                                  hiddenLayer value                                                                                                                Accuracy (number of correct classified instances)

                                                                                                                                               1,1                                                                                                     26.2079 %
                                                                                                                                               5,1                                                                                                     32.7965 %
                                                                                                                                              10,1                                                                                                     39.6779 %
                                                                                                                                               1,5                                                                                                     26.2079 %
                                                                                                                                               5,5                                                                                                     74.0849 %
                                                                                                                                              10,5                                                                                                     79.063 %
                                                                                                                                              1,10                                                                                                     23.1332 %
                                                                                                                                              5,10                                                                                                     77.5988 %
                                                                                                                                              10,10                                                                                                    94.2899 %


Now we do the same thing but we only adjust the learning rate to 1.0. Unfortunately weka was unable to
set a higher learning rate then 1.0. So 1.0 is the heighest value which we could pick.


                                                                                                  hiddenLayer value                                                                                                                Accuracy (number of correct classified instances)

                                                                                                                                               1,1                                                                                                     26.2079 %
                                                                                                                                               5,1                                                                                                     38.9458 %
                                                                                                                                              10,1                                                                                                     49.3411 %
                                                                                                                                               1,5                                                                                                     28.1113 %
                                                                                                                                               5,5                                                                                                     69.5461 %
                                                                                                                                              10,5                                                                                                     80.9663 %
                                                                                                                                              1,10                                                                                                     23.1332 %
                                                                                                                                              5,10                                                                                                     76.2811 %
                                                                                                                                              10,10                                                                                                    89.019 %


As a final test we want to know what the accuracy is we have a maximum value but below 1.0. So for
this final test we set the learning rate to a value of 0.9.


                                                                                                  hiddenLayer value                                                                                                                Accuracy (number of correct classified instances)

                                                                                                                                               1,1                                                                                                     26.2079 %
                                                                                                                                               5,1                                                                                                     27.0864 %
                                                                                                                                              10,1                                                                                                     48.3163 %
                                                                                                                                               1,5                                                                                                     28.5505 %
                                                                                                                                               5,5                                                                                                     67.4963 %
                                                                                                                                              10,5                                                                                                     82.4305 %
                                                                                                                                              1,10                                                                                                     28.1113 %
                                                                                                                                              5,10                                                                                                     73.3529 %
                                                                                                                                              10,10                                                                                                    94.8755 %


If we observe the tables which are listed above it’s hard to say where our increase of accuracy is. What
we do see is that our maximum hiddenLayer gives us the highest accuracy. This counts for using both
                                            2
the learning rates 0.6 and 0.9 (94,8755 %).




	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
2
 Unfortunately Weka was not able to set the learning rate to a higher value then 1.0. There was a fixed maximum set
of 1.0 withing the program



9

Contenu connexe

Tendances

Understanding random forests
Understanding random forestsUnderstanding random forests
Understanding random forestsMarc Garcia
 
Decision tree, softmax regression and ensemble methods in machine learning
Decision tree, softmax regression and ensemble methods in machine learningDecision tree, softmax regression and ensemble methods in machine learning
Decision tree, softmax regression and ensemble methods in machine learningAbhishek Vijayvargia
 
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…Dongseo University
 
Week8finalexamlivelecture dec2012
Week8finalexamlivelecture dec2012Week8finalexamlivelecture dec2012
Week8finalexamlivelecture dec2012Brent Heard
 
Week8finalexamlivelecture april2012
Week8finalexamlivelecture april2012Week8finalexamlivelecture april2012
Week8finalexamlivelecture april2012Brent Heard
 
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1Daniel Katz
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.pptbutest
 
Calculus - Functions Review
Calculus - Functions ReviewCalculus - Functions Review
Calculus - Functions Reviewhassaanciit
 
Introduction to Functions
Introduction to FunctionsIntroduction to Functions
Introduction to FunctionsMelanie Loslo
 
Discrete Random Variable (Probability Distribution)
Discrete Random Variable (Probability Distribution)Discrete Random Variable (Probability Distribution)
Discrete Random Variable (Probability Distribution)LeslyAlingay
 
Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2
Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2
Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2Daniel Katz
 

Tendances (19)

Understanding random forests
Understanding random forestsUnderstanding random forests
Understanding random forests
 
Decision tree, softmax regression and ensemble methods in machine learning
Decision tree, softmax regression and ensemble methods in machine learningDecision tree, softmax regression and ensemble methods in machine learning
Decision tree, softmax regression and ensemble methods in machine learning
 
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
2013-1 Machine Learning Lecture 06 - Artur Ferreira - A Survey on Boosting…
 
Chapter12
Chapter12Chapter12
Chapter12
 
Week8finalexamlivelecture dec2012
Week8finalexamlivelecture dec2012Week8finalexamlivelecture dec2012
Week8finalexamlivelecture dec2012
 
Week8finalexamlivelecture april2012
Week8finalexamlivelecture april2012Week8finalexamlivelecture april2012
Week8finalexamlivelecture april2012
 
Lecture11
Lecture11Lecture11
Lecture11
 
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1Quantitative Methods for Lawyers - Class #22 -  Regression Analysis - Part 1
Quantitative Methods for Lawyers - Class #22 - Regression Analysis - Part 1
 
Student t t est
Student t t estStudent t t est
Student t t est
 
Chapter4
Chapter4Chapter4
Chapter4
 
Exponent properties
Exponent propertiesExponent properties
Exponent properties
 
Week 7 Lecture
Week 7 LectureWeek 7 Lecture
Week 7 Lecture
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.ppt
 
Unit 7.5
Unit 7.5Unit 7.5
Unit 7.5
 
Calculus - Functions Review
Calculus - Functions ReviewCalculus - Functions Review
Calculus - Functions Review
 
Introduction to Functions
Introduction to FunctionsIntroduction to Functions
Introduction to Functions
 
Discrete Random Variable (Probability Distribution)
Discrete Random Variable (Probability Distribution)Discrete Random Variable (Probability Distribution)
Discrete Random Variable (Probability Distribution)
 
Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2
Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2
Quantitative Methods for Lawyers - Class #19 - Regression Analysis - Part 2
 
adaboost
adaboostadaboost
adaboost
 

Similaire à Data mining Computerassignment 3

Confidence Level and Sample Size
Confidence Level and Sample SizeConfidence Level and Sample Size
Confidence Level and Sample SizeEmilio Fer Villa
 
Data mining Computerassignment 2
Data mining Computerassignment 2Data mining Computerassignment 2
Data mining Computerassignment 2BarryK88
 
VCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurmentsVCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurmentsAndrew Grichting
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptxmahamoh6
 
Solution manual for design and analysis of experiments 9th edition douglas ...
Solution manual for design and analysis of experiments 9th edition   douglas ...Solution manual for design and analysis of experiments 9th edition   douglas ...
Solution manual for design and analysis of experiments 9th edition douglas ...Salehkhanovic
 
DATA MINING - EVALUATING CLUSTERING ALGORITHM
DATA MINING - EVALUATING CLUSTERING ALGORITHMDATA MINING - EVALUATING CLUSTERING ALGORITHM
DATA MINING - EVALUATING CLUSTERING ALGORITHMTochukwu Udeh
 
Measurement & uncertainty pp presentation
Measurement & uncertainty pp presentationMeasurement & uncertainty pp presentation
Measurement & uncertainty pp presentationsimonandisa
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.pptbutest
 
The Dark Art of Production Alerting
The Dark Art of Production AlertingThe Dark Art of Production Alerting
The Dark Art of Production AlertingAlois Reitbauer
 
MACHINE LEARNING PPT K MEANS CLUSTERING.
MACHINE LEARNING PPT K MEANS CLUSTERING.MACHINE LEARNING PPT K MEANS CLUSTERING.
MACHINE LEARNING PPT K MEANS CLUSTERING.AmnaArooj13
 
ML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptxML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptxbelay41
 
Reinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAIReinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAIRaouf KESKES
 
Jwan kareem.biostatic exercise
Jwan kareem.biostatic exerciseJwan kareem.biostatic exercise
Jwan kareem.biostatic exerciseJwanSalh
 
Sampling & Statistical Inference.pdf
Sampling & Statistical Inference.pdfSampling & Statistical Inference.pdf
Sampling & Statistical Inference.pdfMdNahiduzzamanNahid2
 
Dimd_m_004 DL.pdf
Dimd_m_004 DL.pdfDimd_m_004 DL.pdf
Dimd_m_004 DL.pdfjuan631
 
Labs for College Physics Mechanics Worksheet Experiment 2-1.docx
Labs for College Physics Mechanics Worksheet Experiment 2-1.docxLabs for College Physics Mechanics Worksheet Experiment 2-1.docx
Labs for College Physics Mechanics Worksheet Experiment 2-1.docxDIPESH30
 
Multi-class Bio-images Classification
Multi-class Bio-images ClassificationMulti-class Bio-images Classification
Multi-class Bio-images ClassificationZhuo Li
 
Modified monte carlo technique for confidence limits of system reliability us...
Modified monte carlo technique for confidence limits of system reliability us...Modified monte carlo technique for confidence limits of system reliability us...
Modified monte carlo technique for confidence limits of system reliability us...DineshRaj Goud
 

Similaire à Data mining Computerassignment 3 (20)

Confidence Level and Sample Size
Confidence Level and Sample SizeConfidence Level and Sample Size
Confidence Level and Sample Size
 
Data mining Computerassignment 2
Data mining Computerassignment 2Data mining Computerassignment 2
Data mining Computerassignment 2
 
VCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurmentsVCE Physics: Dealing with numerical measurments
VCE Physics: Dealing with numerical measurments
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Solution manual for design and analysis of experiments 9th edition douglas ...
Solution manual for design and analysis of experiments 9th edition   douglas ...Solution manual for design and analysis of experiments 9th edition   douglas ...
Solution manual for design and analysis of experiments 9th edition douglas ...
 
DATA MINING - EVALUATING CLUSTERING ALGORITHM
DATA MINING - EVALUATING CLUSTERING ALGORITHMDATA MINING - EVALUATING CLUSTERING ALGORITHM
DATA MINING - EVALUATING CLUSTERING ALGORITHM
 
Measurement & uncertainty pp presentation
Measurement & uncertainty pp presentationMeasurement & uncertainty pp presentation
Measurement & uncertainty pp presentation
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
 
MLlectureMethod.ppt
MLlectureMethod.pptMLlectureMethod.ppt
MLlectureMethod.ppt
 
The Dark Art of Production Alerting
The Dark Art of Production AlertingThe Dark Art of Production Alerting
The Dark Art of Production Alerting
 
Measurement & Error
Measurement & ErrorMeasurement & Error
Measurement & Error
 
MACHINE LEARNING PPT K MEANS CLUSTERING.
MACHINE LEARNING PPT K MEANS CLUSTERING.MACHINE LEARNING PPT K MEANS CLUSTERING.
MACHINE LEARNING PPT K MEANS CLUSTERING.
 
ML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptxML-ChapterFour-ModelEvaluation.pptx
ML-ChapterFour-ModelEvaluation.pptx
 
Reinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAIReinforcement learning Research experiments OpenAI
Reinforcement learning Research experiments OpenAI
 
Jwan kareem.biostatic exercise
Jwan kareem.biostatic exerciseJwan kareem.biostatic exercise
Jwan kareem.biostatic exercise
 
Sampling & Statistical Inference.pdf
Sampling & Statistical Inference.pdfSampling & Statistical Inference.pdf
Sampling & Statistical Inference.pdf
 
Dimd_m_004 DL.pdf
Dimd_m_004 DL.pdfDimd_m_004 DL.pdf
Dimd_m_004 DL.pdf
 
Labs for College Physics Mechanics Worksheet Experiment 2-1.docx
Labs for College Physics Mechanics Worksheet Experiment 2-1.docxLabs for College Physics Mechanics Worksheet Experiment 2-1.docx
Labs for College Physics Mechanics Worksheet Experiment 2-1.docx
 
Multi-class Bio-images Classification
Multi-class Bio-images ClassificationMulti-class Bio-images Classification
Multi-class Bio-images Classification
 
Modified monte carlo technique for confidence limits of system reliability us...
Modified monte carlo technique for confidence limits of system reliability us...Modified monte carlo technique for confidence limits of system reliability us...
Modified monte carlo technique for confidence limits of system reliability us...
 

Plus de BarryK88

Data mining test notes (back)
Data mining test notes (back)Data mining test notes (back)
Data mining test notes (back)BarryK88
 
Data mining test notes (front)
Data mining test notes (front)Data mining test notes (front)
Data mining test notes (front)BarryK88
 
Data mining assignment 2
Data mining assignment 2Data mining assignment 2
Data mining assignment 2BarryK88
 
Data mining assignment 5
Data mining assignment 5Data mining assignment 5
Data mining assignment 5BarryK88
 
Data mining assignment 1
Data mining assignment 1Data mining assignment 1
Data mining assignment 1BarryK88
 
Data mining Computerassignment 1
Data mining Computerassignment 1Data mining Computerassignment 1
Data mining Computerassignment 1BarryK88
 
Semantic web final assignment
Semantic web final assignmentSemantic web final assignment
Semantic web final assignmentBarryK88
 
Semantic web assignment 3
Semantic web assignment 3Semantic web assignment 3
Semantic web assignment 3BarryK88
 
Semantic web assignment 2
Semantic web assignment 2Semantic web assignment 2
Semantic web assignment 2BarryK88
 
Semantic web assignment1
Semantic web assignment1Semantic web assignment1
Semantic web assignment1BarryK88
 

Plus de BarryK88 (10)

Data mining test notes (back)
Data mining test notes (back)Data mining test notes (back)
Data mining test notes (back)
 
Data mining test notes (front)
Data mining test notes (front)Data mining test notes (front)
Data mining test notes (front)
 
Data mining assignment 2
Data mining assignment 2Data mining assignment 2
Data mining assignment 2
 
Data mining assignment 5
Data mining assignment 5Data mining assignment 5
Data mining assignment 5
 
Data mining assignment 1
Data mining assignment 1Data mining assignment 1
Data mining assignment 1
 
Data mining Computerassignment 1
Data mining Computerassignment 1Data mining Computerassignment 1
Data mining Computerassignment 1
 
Semantic web final assignment
Semantic web final assignmentSemantic web final assignment
Semantic web final assignment
 
Semantic web assignment 3
Semantic web assignment 3Semantic web assignment 3
Semantic web assignment 3
 
Semantic web assignment 2
Semantic web assignment 2Semantic web assignment 2
Semantic web assignment 2
 
Semantic web assignment1
Semantic web assignment1Semantic web assignment1
Semantic web assignment1
 

Data mining Computerassignment 3

  • 1. Data mining ‘Epochs & Accuracy’ ~ Using the MultiLayerPerceptron function on a deliverd database ~ COMPUTER ASSIGNMENT 3 BARRY KOLLEE 10349863
  • 2. Computerassignment 3 Exercise 1a): In the GUI screen you need to adjust the epochs (500 is too much). Start by choosing 5. Select Start. Select Accept. The output screen gives you the accuracy of the learned model. I’ve loaded up the soybean.arff file into weka and did the following: • Used the MultiLayerPerceptron classifier • Set training set under test options Set GUI on true I performed the MultiLayerPerceptron with an Epoch of 5. The accuracy of an epoch of 5 (5 iterations) is given in red. Epoch of 5 Correctly Classified Instances 534 78.1845 % Incorrectly Classified Instances 149 21.8155 % Info about this evaluation Epoch = 5 Error per Epoch = 0.0164204 Learning Rate = 0.3 Momentum = 0.2 Exercise 1b): Repeat the training with different settings (epochs 5, 10, 50 and 100) and see what happens to the performance. Epoch set to 10 Correctly Classified Instances 638 93.4114 % Incorrectly Classified Instances 45 6.5886 % Info about this evaluation Epoch = 10 Error per Epoch = 0.0068437 Learning Rate = 0.3 Momentum = 0.2 Epoch set to 50 Correctly Classified Instances 674 98.6823 % Incorrectly Classified Instances 9 1.3177 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0004657 Learning Rate = 0.3 Momentum = 0.2 2
  • 3. Computerassignment 3 Epoch set to 100 Correctly Classified Instances 679 99.4143 % Incorrectly Classified Instances 4 0.5857 % Info about this evaluation Epoch = 100 Error per Epoch = 0.0002785 Learning Rate = 0.3 Momentum = 0.2 Now we place all our findings of the different epochs into one table. Then it becomes clear which epoch gives us the highest accuracy. The learning rate within the underneath table has been set to 0.3. Number of Epochs/iterations Accuracy (number of correct classified instances) 5 78.1845 % 10 93.4114 % 50 98.6823 % 100 99.4143 % It becomes clear that, when we increase the number of epochs (iterations), the accuracy climbs up also. The increasing of the accuracy is mostly occurring when the epoch (number of iterations) is between 1 and 10. When we increase the number epochs to a value which is higher then 10, then there’s a significant lower increase of the accuracy. The percentage of incorrect classified instances, when using 100 as the input value of Epoch, has been decreased to 0.5657 %. So that might be ‘negligbible’. In conclusion we can state that using higher values for epoch wouldn’t be necessary with this learning rate. If we also check the tables with ‘info about this evaluation’ we can also see that the error per epoch has been decreased significantly when we increased the number of epoch(s). 3
  • 4. Computerassignment 3 Exercise 2: Pick one epoch value, and start playing with the "learning rate" parameter, e.g. try 0.1, 0.3, and 0.6. Again, look for each value what happens to the accuracy. I’ve chosen for using an epoch value of 10 within the three outputs listed below. The accuracy (number of correct and incorrect instances) is given in red. Learning rate set to 0.1 Correctly Classified Instances 494 72.328 % Incorrectly Classified Instances 189 27.672 % Info about this evaluation Epoch = 10 Error per Epoch = 0.0196909 Learning Rate = 0.1 Momentum = 0.2 Learning rate set to 0.3 Epoch set to 10 Correctly Classified Instances 638 93.4114 % Incorrectly Classified Instances 45 6.5886 % Info about this evaluation Epoch = 10 Error per Epoch = 0.0068437 Learning Rate = 0.3 Momentum = 0.2 Learning rate set to 0.6 Correctly Classified Instances 638 93.4114 % Incorrectly Classified Instances 45 6.5886 % Info about this evaluation Epoch = 10 Error per Epoch = 0.0050657 Learning Rate = 0.6 Momentum = 0.2 Now we place our findings in a table where we put the learning rate Learning rate Accuracy (number of correct classified instances) 0.1 72.328 % 0.3 93.4114 % 0.6 93.4114 % We see that increasing the learning rate from 0.1 to 0.3 has affected the accuracy in a good way. However we see that if we would increase the learning rate it’s value even more that we won’t have a higher accuracy. It might be interesting to take a look at a learning rate of 0.2 and check if the accuracy, when using a learning rate of 0.2, has been affected if we compare it to a learning rate of 0.1. 4
  • 5. Computerassignment 3 The result of a learning set which has been set to 0.2 is listed below. The accuracy is given in red. Correctly Classified Instances 612 89.6047 % Incorrectly Classified Instances 71 10.3953 % Info about this evaluation Epoch = 10 Error per Epoch = 0.0112326 Learning Rate = 0.2 Momentum = 0.2 We see that the accuracy has climbed up significantly if we compare the learning rates of 0.1, 0.2 and 0.3. learning rate 0.1 = 72.328 % learning rate 0.2 = 89.6047 % 89.6047 / 72.3280 ≈ 1.24 increase factor learning rate 0.2 = 89.6047 % learning rate 0.3 = 93.4114 % 93.4114 / 89.6047 ≈ 1.04 increase factor learning rate 0.1 = 72.328 % learning rate 0.3 = 93.4114 % 93.4114 / 89.6047 ≈ 1.29 increase factor Another conclusion we can make is that the highest increasing factor is between a learning rate of 0.1 and 0.2. When increasing the learning rate any further is has a small effect on the accuracy of our model. Another thing we can conclude is that the highest accuracy within this test has occurred when using a 1 learning rate of 0.3. We did observed a decrease of the error per epoch of 0.001 between the learning rates 0.3 and 0.6, but that hasn’t affected the accuracy (number of correctly classified instances).                                                                                                                 1  See ‘info about this evaluation’ of learing rate 0.3 & 0.6. Difference between these values. 2 Unfortunately Weka was not able to set the learning rate to a higher value then 1.0. There was a fixed maximum set 5
  • 6. Computerassignment 3 Exercise 3. As a final experiment, pick one value for both epoch and learning rate, and play with the hiddenLayers (in the same window as where you set GUI to true). The default value is 'a', try setting it differently (e.g. 5 or 10) and try multiple values at the same time (e.g. 10,10). Again, look at performance of the model for various settings. For the final experiment I’ve chosen to an epoch of 50 and a learning rate of 0.2. These are the results when the hiddenLayers feature is set to it’s default value ‘a’. The accuracy is given in red. Correctly Classified Instances 673 98.5359 % Incorrectly Classified Instances 10 1.4641 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0008995 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘a’ Now we set the value of hiddenLayers to 1. The output is listed below (and the accuracy in red). Correctly Classified Instances 91 13.3236 % Incorrectly Classified Instances 592 86.6764 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0481054 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘1’ Now we set the hiddenLayer option to 3. The accuracy is given in red again Correctly Classified Instances 408 59.7365 % Incorrectly Classified Instances 275 40.2635 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0269675 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘3’ Now we set the hiddenLayer option to 5. The accuracy is given in red again. Correctly Classified Instances 478 69.9854 % Incorrectly Classified Instances 205 30.0146 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0173471 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘5’ 6
  • 7. Computerassignment 3 Now we set the hiddenLayer value to 10. The accuracy is given in red (again): Correctly Classified Instances 615 90.0439 % Incorrectly Classified Instances 68 9.9561 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0062486 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘10’ Now we set the hiddenLayers option to 20. The accuracy is given in red again. Correctly Classified Instances 667 97.6574 % Incorrectly Classified Instances 16 2.3426 % Info about this evaluation Epoch = 50 Error per Epoch = 0.001507 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘20’ Now we do a final test to see if there’s still a significant increase within the accuracy. We set the hiddenLayers option to 30. The results are listed below with the accuracy in red. Correctly Classified Instances 672 98.3895 % Incorrectly Classified Instances 11 1.6105 % Info about this evaluation Epoch = 50 Error per Epoch = 0.0014833 Learning Rate = 0.2 Momentum = 0.2 hiddenLayers = ‘30’ We can now make a clear table where we note all accuracy’s weighted to the hiddenLayers it’s input value. The underneath table shows us that the most significant increase of the accuracy is within 1 to 10 layers. After 20-30 hiddenLayers we have an almost perfect accuracy. hiddenLayers value Accuracy (number of correct classified instances) ‘a’ (default) 98.5359 % 1 13.3236 % 3 59.7365 % 5 69.9854 % 10 90.0439 % 20 97.6574 % 30 98.3895 % I’ve also visualized the outputs. It’s becoming clear that the more hiddenLayers we put in the more connections can me made between the input attributes and the output attributes. We see that the red dots represents the number of hiddenLayers which we have put in. 7
  • 8. Computerassignment 3 Epoch of 1 Epoch of 3 Epoch of 10 Epoch of 20 Epoch of 30 Now we test the same number of hiddenLayers but then with a learning rate of 0.3 and we leave the epoch as it was (50 iterations). The accuracy of these output are listed below. If we compare these numbers to the previous table we can state that they’re pretty similar and that it’s hard to say how they differ.   hiddenLayers value Accuracy (number of correct classified instances) ‘a’ (default) 98.6823 % 1 24.0117 % 3 55.7833 % 5 68.6676 % 10 91.8009 % 20 98.0966 % 30 98.6823 % Now we try different settings for the hiddenLayer feature. Instead of adding one integer we add two. This will result in 2 layers of hiddenLayers. We leave the learning rate as 0.3 and use an epoch of 50 (50 iterations) as we have used in the previous examples also. We see that we get a ‘multi layer perceptron’. Epoch set to 5,1 Epoch set to 1,5 Epoch set to 5,5 8
  • 9. Computerassignment 3 hiddenLayer value Accuracy (number of correct classified instances) 1,1 26.2079 % 5,1 32.0644 % 10,1 26.2079 % 1,5 30.7467 % 5,5 62.0791 % 10,5 64.1288 % 1,10 32.7965 % 5,10 65.593 % 10,10 71.5959 % Now we do the same thing but we only adjust the learning rate to 0.6 hiddenLayer value Accuracy (number of correct classified instances) 1,1 26.2079 % 5,1 32.7965 % 10,1 39.6779 % 1,5 26.2079 % 5,5 74.0849 % 10,5 79.063 % 1,10 23.1332 % 5,10 77.5988 % 10,10 94.2899 % Now we do the same thing but we only adjust the learning rate to 1.0. Unfortunately weka was unable to set a higher learning rate then 1.0. So 1.0 is the heighest value which we could pick. hiddenLayer value Accuracy (number of correct classified instances) 1,1 26.2079 % 5,1 38.9458 % 10,1 49.3411 % 1,5 28.1113 % 5,5 69.5461 % 10,5 80.9663 % 1,10 23.1332 % 5,10 76.2811 % 10,10 89.019 % As a final test we want to know what the accuracy is we have a maximum value but below 1.0. So for this final test we set the learning rate to a value of 0.9. hiddenLayer value Accuracy (number of correct classified instances) 1,1 26.2079 % 5,1 27.0864 % 10,1 48.3163 % 1,5 28.5505 % 5,5 67.4963 % 10,5 82.4305 % 1,10 28.1113 % 5,10 73.3529 % 10,10 94.8755 % If we observe the tables which are listed above it’s hard to say where our increase of accuracy is. What we do see is that our maximum hiddenLayer gives us the highest accuracy. This counts for using both 2 the learning rates 0.6 and 0.9 (94,8755 %).                                                                                                                 2 Unfortunately Weka was not able to set the learning rate to a higher value then 1.0. There was a fixed maximum set of 1.0 withing the program 9