<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Optimum size of feed forward neural network for Iris data set.</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Wojciech Masarczyk Faculty of Applied Mathematics Silesian University of Technology Gliwice</institution>
          ,
          <country country="PL">Poland</country>
        </aff>
      </contrib-group>
      <fpage>14</fpage>
      <lpage>19</lpage>
      <abstract>
        <p>-This paper illustrates a process of finding optimum structure of neural network which will be used to solve problem of Iris data set. This work presents dependencies between number of layers, neurons and efficiency of network providing the best configuration for given data set.</p>
      </abstract>
      <kwd-group>
        <kwd>feed forward neural network</kwd>
        <kwd>Iris data set</kwd>
        <kwd>backpropagation algorithm</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>
        Computers can help on automated models implemented to
co-work with other devices in service. We can find various
application of intelligent systems in medicine, technology,
transport, etc. We expect from computer to control possible dangers
and advise the best options, while assisting humans [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
However in these aspects it is necessary to process data of
various origins [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. We have many possible approaches to
data analysis. There are solutions devoted to big data [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ],
where we use some sophisticated methods implemented for
knowledge engineering.
      </p>
      <p>
        Mainly computational intelligence is assisting in data
processing to discover knowledge from input data, there are
mathematical models implemented to find incomplete
information and work with this issues [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Similarly we can
find reports on efficiency of neural networks in processing
incoming information [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Neural networks are efficient in
processing input data of various types, from voice samples
[
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] to handwritings [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. However to improve efficiency of
processing it is important to discuss optimum size of these
architectures, what will be done in this article using iris data
set as an example.
      </p>
    </sec>
    <sec id="sec-2">
      <title>II. NEURAL NETWORK MODEL</title>
      <sec id="sec-2-1">
        <title>A. Biological inspiration</title>
        <p>
          Neural network is a biologically inspired model of
mathematical computations which structure is based on
architecture of human brain. In the simplest approach
brain consists of approximately 8:6 1010[
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] neurons
that are connected with each other creating a network of
1015 connections through which impulses are being sent
Copyright c 2017 held by the authors.
simultaneously resulting in brain processing speed close to
1018 operations per second.
        </p>
        <p>Why one should even bother applying neural network into any
field of computations? Mostly due to the fact that artificial
neural networks are able to generalize obtained knowledge
which means that after proper training such network should
be able to predict correctly value of given example not
included in training data. Second advantage of these models
is robustness for random fluctuations or lack of part of values
in data set. Generally neural networks are used to solve
problems that seems to be incomputable or too complicated
to solve by classical algorithms.</p>
      </sec>
      <sec id="sec-2-2">
        <title>B. Artificial neuron</title>
        <p>One can observe that artificial neuron is really simplified
versions of human neuron, however still keeps three most
important features of neuron:
-taking input from other neurons (dendrites)
-computing and processing impulses taken as input
-sending on computed impulse to further neurons(axon)</p>
        <p>One cycle of computations in neurons may be described
as follow: values are being multiplied by appropriate weights
and summed together in a cell of neuron after which sum is
taken as argument to activation function which value is set to
be impulse send as the output of neuron. Equation describing
this process is presented below:</p>
        <p>n
y = f ( P w(xi)j xi),
i=1
(1)
where
w(xi)j
xi
f</p>
        <p>weight between i and j neuron in consecutive layers, Figure 2. Graph of different activation functions tested in this paper
value of neuron i,
activation function
In (1) it is assumed that previous layers consists of n neurons.</p>
      </sec>
      <sec id="sec-2-3">
        <title>C. Activation function</title>
        <p>Activation functions is an abstract indicator that says about
action taken in neuron. In simplest case once information is
important it outputs 1 otherwise neuron outputs 0. This model
is called a binary step function, despite its simplicity it is
able to solve a few problems, however it is insufficient with
more complex problems due to the lack of desired features
detailed in following list:
- Finite range results in stability while gradient - based
method are used for learning
- Continuous differentiable is necessary for every gradient
based method, because of that feature binary step function
cannot be used in models with gradient based learning
algorithms.
- Identity near origin fasten the learning process once initial
weights are small numbers.</p>
        <p>In this paper results will be obtained using only four different
activation functions:</p>
        <sec id="sec-2-3-1">
          <title>Logistic function:</title>
          <p>where</p>
        </sec>
        <sec id="sec-2-3-2">
          <title>Hyperbolic tangent:</title>
        </sec>
        <sec id="sec-2-3-3">
          <title>Arctangent</title>
          <p>f (x) = 1+e1 x
determines steepness of function near origin,
2
f (x) = tanh (x) = 1+e 2x
1</p>
        </sec>
        <sec id="sec-2-3-4">
          <title>Modified Hyperbolic tangent:</title>
          <p>
            Modification proposed by Yann LeCun [
            <xref ref-type="bibr" rid="ref6">6</xref>
            ]
1
f (x) = tan x
f (x) = 1:7159 tanh( 23 x)
          </p>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>D. Neural network</title>
        <p>Feed forward neural network is constructed by neurons
stacked in a rows called layers that are fully connected
with previous and subsequent layer. First and last layer are
respectively called input and output layer, each layer between
these two is called a hidden layer. Role of neurons in input
layer is to store the initial data and send it further. Flow of
information takes place from left to right, so once initial data
is provided the result will appear at the output layer which
ends one full cycle of computations for network.
(2)
(3)
(4)
(5)
w(i)j
i
According to (1) output of neural network is just a sum of
random weights multiplied by initial values, the only
parameter that might be modified in neural network are weights so
learning algorithm is just a process of changing weights in
such way that output is exactly the same as presented in data
set. In this paper backpropagation algorithm will be discussed.</p>
      </sec>
      <sec id="sec-2-5">
        <title>E. Backpropagation algorithm</title>
        <p>To train the network it is necessary to provide a data
set that consists of vector of input signals (x1; x2; :::; xn)
and corresponding desired output z. Thanks to this fact it is
possible to compute the difference between output signal y
and desired value z. Let = z y. Next step is to propagate
error through every neuron according to equation:
n
j = P w(j)i i,
i=1
(6)
weight between i and j neuron in consecutive layer,
value of error on neuron i in consecutive layer,
weight between i and j neuron in consecutive layers,
value of neuron j,
activation function on neuron i
value of error on neuron i in consecutive layer,
coefficient that affects speed of learning.</p>
        <p>Once error is computed for each neuron following step is
to actualize weights using equation below:
number of iterations,
number of neurons in network,
Learning is an iterative process that takes place until
output layer is smaller than desired precision.</p>
        <p>III. CONVERGENCE OF GRADIENT DESCENT ALGORITHM</p>
        <p>WITH RESPECT TO</p>
        <p>While analyzing equation (7) it is obvious that has a
direct impact on pace of learning of neural network since
derivative determines direction where error function descends.
It is crucial to select balanced value of . Too small value
may result in slow learning process while value bigger than
necessary will end with divergence of algorithm. Four different
scenarios of values are presented in graphical interpretation.
Every test in this paper was carried out with = 0:02 as it
appears to be most suitable value of this parameter.</p>
        <p>IV. IRIS DATA SET</p>
        <p>
          Iris data set is a classic and one of the best known sets
for pattern recognition described in [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. It consists of 150
instances that are equally divided into three different classes.
Each class refers to a different type of iris plant. Every sample
is a vector of length equal four, where vector components
describes:
1. sepal length [cm]
2. sepal width [cm]
3. petal length [cm]
4. petal width [cm].
        </p>
        <p>In order to create training data set, 35 samples were chosen
from each class, so that 30% of whole set is left for testing
accuracy of trained model. The aim for neural network is to
classify Iris, described by these four dimensions, into one of
three given classes.</p>
        <p>V. TESTS</p>
        <p>For further tests is equal to 0.02, it will be pointed out
once will change. In every case desired error is set to be
smaller than 10 5. Maximum epochs are set to 20000.
In order to compare obtained results it is necessary to come up
with general formula determining number of weights in single
network:
n
q = 4 3 Q i,
i=1
where
i neurons on each hidden layer,
n number of hidden layers,
(8)</p>
        <p>As batch learning approach is used in this case every iteration
is equal to updating every weight in whole neural network
structure. Since then it seems natural to come up with equation
describing numbers of updates done throughout whole process
of learning each network.</p>
        <p>Q = q r
(9)
for</p>
        <p>Q from equation (9) will be used in next section to compare
efficiency of different network structures.</p>
      </sec>
      <sec id="sec-2-6">
        <title>A. Results</title>
        <p>It is clearly visible in table below that in case network
consists of only input and output layers (0 hidden layers) it
fails to classify properly each of three types, usually being
able to classify correctly two of them while having issues
with third one. This is caused by the fact that one class is
linearly separable from the other two, however the latter are
not linearly separable from each other.</p>
        <p>
          One can observe that Hyperbolic Tangent function is most
uniform function while being most effective taking into
consideration number of iterations and number of neurons needed
to obtain desired precision. Similar behaviour can be viewed
with Arctangent function, however it fails to work for networks
that were properly computed with Hyperbolic Tan.
On the other side Modified Tangent performed below
expectations, however it is important to remember that all tests were
carried out for fixed . Since steepness of this function is
modified and value of should be set with respect to derivatives
[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] its underperformance seems to be understandable.
After analyzing table it is clear that adding additional hidden
layers is not worth the effort since optimum is obtained for 1 or
2 hidden layers. Note that each hidden layer with 10 neurons
added have to result in decreasing iterations tenfold to be
computationally profitable, unfortunately this does not happen
with any function. Moreover, as shown, network that is too
big (5 hidden layers and more) tend to fail this classification
task at all. It might caused by the fact that Iris Data set is
relatively small (150 examples) and it is not enough to adjust
properly so many weights.
        </p>
        <p>Three graphs presented in this paper represents Error
function over consecutive iterations. Figure 6 presents nearly
perfect plot that is smooth and monotonic at most of a time. On
contrary to the Figure 5 which presents heavy oscillations of
Error function caused by wrong coefficient. Exactly the same
situations appears to be on Figure 7 at around 400 iteration,
luckily it is a situation when &gt; opt and after a few iterations
of oscillations it finally converges. Values presented in table
show that network failed to obtain desired precision in 20000
iterations.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>VI. REMARKS During designing artificial neural network there is a list of crucial parameters that need to be set precisely in order</title>
      <p>to achieve properly working model. As most important and
discussed in this paper are:</p>
      <p>Activation function - as turned out, it has a huge impact
on capabilities of network, not only these provided by
differentiability but also can significantly accelerate
process of learning,
Learning coefficient - highly depends on activation
function, is a crucial factor in converging process of
gradient - based methods of learning,
Number of hidden layers and neurons - in simple
problems like that one discussed in this paper 2 hidden
layers are enough,
Number of iterations and desired precision - again,
strongly depends on problem one tries to solve, there is
no general rule that describes how to set these values,
however it is important to set upper limit of iterations
in order to stop the computations at some point once
learning algorithm is unable to achieve desired precision,</p>
    </sec>
    <sec id="sec-4">
      <title>VII. SUMMARY</title>
      <p>Among various architectures neural networks are one of
most efficient processors of information about controlled
objects, moreover these architectures can cooperate with
information presented in a form of image, voice sample, network
statistics, etc.</p>
      <p>Each implemented solution needs adjusted architecture to
exactly fit the model of decision support. Therefore research
on performance of various types can give valuable information
about performance, what can improve implementations of
neural networks.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Artiemjew</surname>
          </string-name>
          ,
          <source>Stability of Optimal Parameters for Classifier Based on Simple Granules of Knowledge</source>
          ,
          <source>Technical Sciences</source>
          , vol.
          <volume>14</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>57</fpage>
          -
          <lpage>69</lpage>
          . UWM Publisher,
          <year>Olsztyn 2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>P.</given-names>
            <surname>Artiemjew</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Gorecki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Sopyła</surname>
          </string-name>
          ,
          <article-title>Categorization of Similar Objects Using Bag of Visual Words and k - Nearest Neighbour Classifier</article-title>
          ,
          <source>Technical Sciences</source>
          , vol.
          <volume>15</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>293</fpage>
          -
          <lpage>305</lpage>
          ,
          <string-name>
            <given-names>UWM</given-names>
            <surname>Publisher</surname>
          </string-name>
          ,
          <year>Olsztyn 2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Damasevicius</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Vasiljevas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Salkevicius</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Woz´niak, “Human Activity Recognition in AAL Environments Using Random Projections” Comp</article-title>
          . Math. Methods in Medicine, vol.
          <year>2016</year>
          , pp.
          <volume>4073584</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>4073584</lpage>
          :
          <fpage>17</fpage>
          ,
          <year>2016</year>
          , DOI: 10.1155/
          <year>2016</year>
          /4073584.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Damasevicius</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Maskeliunas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Venckauskas</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Woz´niak, “Smartphone User Identity Verification Using Gait Characteristics” Symmetry</article-title>
          , vol.
          <volume>8</volume>
          , no.
          <issue>10</issue>
          , pp.
          <volume>100</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>100</lpage>
          :
          <fpage>20</fpage>
          ,
          <year>2016</year>
          , DOI: 10.3390/sym8100100.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>S.</given-names>
            <surname>Herculano-Houzel</surname>
          </string-name>
          ,
          <article-title>The human brain in numbers: a linearly scaled-up primate brain, Frontiers in Human Neuroscience vol</article-title>
          .
          <volume>3</volume>
          , pp.
          <volume>31</volume>
          :
          <fpage>1</fpage>
          -
          <lpage>31</lpage>
          :
          <fpage>11</fpage>
          ,
          <year>2009</year>
          , DOI: 10.3389/neuro.09.031.2009
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Le Cun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Bottou</surname>
          </string-name>
          , G. Orr,
          <string-name>
            <given-names>K.</given-names>
            <surname>Muller</surname>
          </string-name>
          ,
          <article-title>Efficient backprop</article-title>
          .
          <source>Neural Networks: Tricks of the trade</source>
          ,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>R.</given-names>
            <surname>Fisher</surname>
          </string-name>
          ,
          <article-title>The use of multiple measurements in taxonomic problems</article-title>
          ,
          <source>Annual Eugenics</source>
          , vol.
          <volume>7</volume>
          , pp.
          <fpage>179</fpage>
          -
          <lpage>188</lpage>
          ,
          <year>1936</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Marszałek</surname>
          </string-name>
          , “Novel Recursive Fast Sort Algorithm,” in Communications in
          <source>Computer and Information Science</source>
          , vol.
          <volume>639</volume>
          , pp.
          <fpage>344</fpage>
          -
          <lpage>355</lpage>
          ,
          <year>2016</year>
          , DOI: 10.1007/978-3-
          <fpage>319</fpage>
          -46254-7_
          <fpage>27</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Tramontana</surname>
          </string-name>
          , E., “
          <article-title>An object-oriented neural network toolbox based on design patterns,”</article-title>
          <source>in International Conference on Information and Software Technologies</source>
          , pp.
          <fpage>388</fpage>
          -
          <lpage>399</lpage>
          ,
          <year>2015</year>
          , DOI: 10.1007/978- 3-
          <fpage>319</fpage>
          -24770-0_
          <fpage>34</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Pappalardo</surname>
          </string-name>
          , E. Tramontana, “
          <article-title>A mathematical model for file fragment diffusion and a neural predictor to manage priority queues over BitTorrent</article-title>
          ,” in
          <source>Applied Mathematics and Computer Science</source>
          , vol.
          <volume>26</volume>
          , no.
          <issue>1</issue>
          , pp.
          <fpage>147</fpage>
          -
          <lpage>160</lpage>
          ,
          <year>2016</year>
          , DOI: 10.1515/amcs-2016-0010.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>D.</given-names>
            <surname>Połap</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Woz´niak, “Flexible Neural Network Architecture for Handwritten Signatures Recognition”</article-title>
          <source>International Journal of Electronics and Telecommunications</source>
          , vol.
          <volume>62</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>197</fpage>
          -
          <lpage>202</lpage>
          ,
          <year>2016</year>
          , DOI: 10.1515/eletel-2016-0027.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          , G. Pappalardo,
          <string-name>
            <given-names>G. M.</given-names>
            <surname>Tina</surname>
          </string-name>
          , E. Tramontana, “
          <article-title>Cooperative strategy for optimal management of smart grids by wavelet rnns and cloud computing” IEEE transactions on neural networks and learning systems</article-title>
          , vol.
          <volume>27</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>1672</fpage>
          -
          <lpage>1685</lpage>
          ,
          <year>2016</year>
          , DOI: 10.1109/TNNLS.
          <year>2015</year>
          .
          <volume>2480709</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>D.</given-names>
            <surname>Połap</surname>
          </string-name>
          , M. Woz´niak, “
          <article-title>Introduction to the Model of the Active Assistance System for Elder and</article-title>
          Disabled People,” in Communications in
          <source>Computer and Information Science</source>
          , vol.
          <volume>639</volume>
          , pp.
          <fpage>392</fpage>
          -
          <lpage>403</lpage>
          ,
          <year>2016</year>
          , DOI: 10.1007/978-3-
          <fpage>319</fpage>
          -46254-7_
          <fpage>31</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>C.</given-names>
            <surname>Napoli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Pappalardo</surname>
          </string-name>
          , E. Tramontana,
          <string-name>
            <given-names>R. K.</given-names>
            <surname>Nowicki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. T.</given-names>
            <surname>Starczewski</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. T.</surname>
          </string-name>
          , M. Woz´niak, “
          <article-title>Toward work groups classification based on probabilistic neural network approach</article-title>
          ” in
          <source>International Conference on Artificial Intelligence and Soft Computing</source>
          , pp.
          <fpage>79</fpage>
          -
          <lpage>89</lpage>
          .
          <year>2016</year>
          , DOI: 10.1007/978-3-
          <fpage>319</fpage>
          -19324-
          <issue>3</issue>
          _
          <fpage>8</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>D.</given-names>
            <surname>Połap</surname>
          </string-name>
          , “
          <article-title>Neuro-heuristic voice recognition</article-title>
          ,
          <source>” in 2016 Federated Conference on Computer Science and Information Systems, FedCSIS</source>
          <year>2016</year>
          , Proceedings.
          <fpage>11</fpage>
          -14 September, Gdan´sk, Poland,
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          <year>2016</year>
          , pp.
          <fpage>487</fpage>
          -
          <lpage>490</lpage>
          , DOI: 10.15439/2016F128.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>