Working of Neural Networks

download Working of Neural Networks

of 12

Transcript of Working of Neural Networks

  • 8/9/2019 Working of Neural Networks

    1/12

    Working of NeuralNetworks

  • 8/9/2019 Working of Neural Networks

    2/12

    Working of a simple neuron

    We selected four inputs of three different flowers(Setosa,Verginica,Versicolor)

    X1-> Petal Width

    X2-> Petal length X3-> Sepal width X4-> Sepal length Each neuron computes output as- Uk = 4*X1+2*X2+X3+X4

    Vk=Uk + Bias Now value of Vk decides the flower.

  • 8/9/2019 Working of Neural Networks

    3/12

    True-391084430132Setosa

    True-231245535132Setosa

    True-131345137154Setosa

    True-61415738173Setosa

    True-371104830141Setosa

    True-381094429142Setosa

    True-141335542142Setosa

    T

    rue-131345434154Setosa

    True-251225036142Setosa

    True-321154930142Setosa

    True-41435138194Setosa

    True-271205030162Setosa

    True-181295138162Setosa

    True-371104432132Setosa

    True-301174936141Setosa

    True-281194831162Setosa

    True-371104636102Setosa

    True-281195033142Setosa

    Function(F=1 if V1

  • 8/9/2019 Working of Neural Networks

    4/12

    True5031068325923Verginica

    False-725363285115Verginica

    True3229264285622Verginica

    True3229268305521Verginica

    True7033072366125Verginica

    True3229269315421Verginica

    True2028067255818Verginica

    True226256284920Verginica

    True4730769325723Verginica

    False-1824260225015Verginica

    True1727764315518Verginica

    True326358275119Verginica

    True2828864285621Verginica

    False026063274918Verginica

    True426463255019Verginica

    False-2823249254517Verginica

    True326358275119Verginica

    True1927965305220Verginica

    True3429469315123Verginica

    Function(F)V1=U1-260(Bias B1)U1=4*X1+2*X2+X3+X4Sepal_length(X4)Sepal_width(X3)Petal_length(X2)Petal_width(X1)Species_Name

    Neuron 2(Training Set)

    Neuron 2 computations U2, Bias , V2 for flower verginica with output v1>0 andV1< 100

  • 8/9/2019 Working of Neural Networks

    5/12

    Neuron 3 computations U3, Bias , V3 for flower versicolor with output v1>200

    True-5120956293613Versicolor

    True-8018051253011Versicolor

    True-1424663254915Versicolor

    True-3422663234413Versicolor

    True-2723359304215Versicolor

    True-4921158273912Versicolor

    True-4721352273914Versicolor

    True-8117949243310Versicolor

    True-2123960294515Versicolor

    True-5320758274110Versicolor

    True-8117950233310Versicolor

    True-4821258264012Versicolor

    True-825270324714Versicolor

    True-625463334716Versicolor

    FunctionV1=U1-230(Bias B1)U1=4*X1+2*X2+X3+X4Sepal_length(X4)Sepal_width(X3)Petal_length(X2)Petal_width(X1)Species_Name

    Neuron 2(Training Set)

  • 8/9/2019 Working of Neural Networks

    6/12

    verginica28864285621Verginica

    setosa174936141Setosa

    setosa194831162Setosa

    versicolor17950233310Versicolor

    setosa1104636102Setosa

    verginica26358275119Verginica

    versicolor25270324714Versicolor

    setosa195033142Setosa

    Neuron 3(Test)Neuron 2(Test)Neuron1 (Test)V1(Output)Sepal_length X4Sepal_width X3Petal_length X2Petal_widthX1

    Species

    Classification based on training set

    Applying Neuron 1 test, Neuron 2 test , Neuron 3 test to classify flowersDepending on the final output and after subtracting bias

  • 8/9/2019 Working of Neural Networks

    7/12

    6.0170092245138194Setosa

    4.5215484075030162Setosa

    4.0944352485138162Setosa

    6.7263957664432132Setosa

    51X4(test)=2.5854206624936141Setosa

    34X3(test)=4.1574511424831162Setosa

    15X2(test)=6.4284057124636102Setosa

    2X1(test)=1.498132175033142Setosa

    1.115526781Min=D(Xtest,Xi)Sepal_length(X4)Sepal_width(X3)Petal_length(X2)Petal_width(X1)Species_Name

    50.1X4(test1)=34.28X3(test1)=14.62X2(test1)=2.46X1(test1)=

    Neuron 1 (Training Set)

    Memory based learning to select vector X(test) for Neuron 1 by finding minimumdeviation from the mean. (Min value not in picture)

  • 8/9/2019 Working of Neural Networks

    8/12

    9.50807981958275119Verginica

    2.76927571164285621Verginica

    7.86334237363274918Verginica

    7.8555524563255019Verginica

    65X4(test)=20.6332283649254517Verginica

    30X3(test)=9.50807981958275119Verginica

    55X2(test)=3.62467594765305220Verginica

    18X1(test)=6.40276647869315123Verginica

    2.235043305Min=DeviationSepal_length(X4)Sepal_width(X3)Petal_length(X2)Petal_width(X1)Species_Name

    65.857143X4(test2)=29.71428571X3(test2)=55.51020408X2(test2)=19.97959184X1(test2)=

    Neuron 2(Training Set)

    Memory based learning to select vector X(test) for Neuron 2 by finding minimumdeviaton from the mean.

  • 8/9/2019 Working of Neural Networks

    9/12

    8.56294526752273914Versicolor

    15.3588886449243310Versicolor

    2.92029335660294515Versicolor

    4.22064302858274110Versicolor

    60X4(test)=14.9781320550233310Versicolor

    29X3(test)=4.04787056958264012Versicolor

    45X2(test)=12.0981340770324714Versicolor

    15X1(test)=7.98452272163334716Versicolor

    2.920293356Min=D(Xtest,Xi)Sepal_length(X4)Sepal_width(X3)Petal_length(X2)Petal_width(X1)Species_Name

    59.408163X4(test3)=27.63265306X3(test3)=43.18367347X2(test3)=13.26530612X1(test3)=

    Neuron 3(Training Set)

    Memory based learning to select vector X(test) for Neuron 3 by finding minimumdeviation from the mean.

  • 8/9/2019 Working of Neural Networks

    10/12

    11.53846154Error %=

    verginica13.190905963.87298334647.4025315864285621Verginica

    setosa36.428011247.56048783.162277664936141Setosa

    setosa34.0293990545.464271694.3588989444831162Setosa

    versicolor17.464249228.6705423722.5831795850233310Versicolor

    setosa40.4845649651.749396137.3484692284636102Setosa

    verginica7.7459666928.66025403841.0243829958275119Verginica

    Versicolor10.6770782510.4403065139.153543970324714Versicolor

    Setosa35.2987251946.593991031.7320508085033142Setosa

    MIN DeviationDeviation(Xtest3)Deviation(Xtest2)Deviation(Xtest1)Sepal_length(X4)Sepal_width(X3)Petal_length(X2)Petal_width(X1)Species

    Memory Based Classification based on training set

    Now using the X1(test) , X2(test) and X3(test) vectors to compute which is theclosest approximation to the input values

  • 8/9/2019 Working of Neural Networks

    11/12

    141052

    w14w13w12w11Final Weights

    14.478810.22125.113811.520144.470052.682031.4304170.1791230.065138194Setosa

    10.00877.539163.683391.341343.336902.486321.0468720.131788.2305030162Setosa

    6.671865.052842.636521.210481.811391.317370.5351830.082576.8785138162Setosa

    4.860473.73542.101331.128141.554281.141920.4440800.032362.9694432132Setosa

    3.306182.593541.657251.096421.041550.672670.3471860.043279.6694936141Setosa

    2.264631.920871.310071.053030.703200.550330.1528690.031191.3164831162Setosa

    1.561421.370541.15721.022450.561420.370540.1572020.022134.7824636102Setosa

    11110000995033142Setosa

    w14w13w12w11w14w13w12w11Yk(X4)(X3)(X2)(X1)Species_Name

    0.0001Learning rate(n)=

    Neuron 1 (Training Set)

    Hebbian learning which computes changes in weights wjk by multiplying thepresynaptic weight Xj with post synaptic weight Yk and learning rate (n)

  • 8/9/2019 Working of Neural Networks

    12/12

    This graph proves hebbian learning because it shows that there is increaseIn weight when the same presynaptic weight is applied to the same neuronTo produce synchronous post synaptic weight