Click here to Skip to main content
15,867,453 members
Articles / Database Development / SQL Server
Article

Hebb neural network

Rate me:
Please Sign up or sign in to vote.
1.00/5 (14 votes)
31 Oct 2007 46.5K   1.6K   20   7
implementation of ocr by hebb algorithm

Introduction

In the name of God.

This a sample for OCR(Optical Character Recognition) in c#.

At this Program use the Hebb Algorithm.

Background

Donald Hebb in 1949 write a Article for single-layer problem.

Using the code

C#
int y=0; int j;
int[,] total ={
{1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1,-1,-1,-1,1,-1,1,-1,1,-1,-1,-1,1},
{-1,1,1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,1,1,-1,-1,-1,1,-1,1,1,1,-1 }
}; 
int[] temp = new int[25];
for (int i = 0; i < 2; i++)
{
for ( j = 0; j < 25; j++)
temp[j] = total[i,j];
switch(i){
case 0: y=1;break;
case 1: y=-1;break;
}
for (j = 0; j < 25; j++)
{
weight[j] = weight[j] + temp[j] * y;
bias = bias + y;
}
}
for (j = 0; j < 25; j++)
{
weights.Items.Add("w"+j.ToString()+" : "+ weight[j].ToString());
}
weights.Items.Add("bias : "+bias.ToString());

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
I am Mohammad Mehdi Norian From Iran (esfahan).
I am a Programmer.
my languages program is delphi,c#.net,pascal,c++,assembly,etc.
but my primary language is delphi.
I study computer software at university.
wish you the best.

Comments and Discussions

 
QuestionMessage Closed Pin
12-Jan-22 19:35
Member 1174385112-Jan-22 19:35 
Questionراهنمایی Pin
mina mohammadzadeh Rasaa21-Oct-14 19:19
mina mohammadzadeh Rasaa21-Oct-14 19:19 
Generalsoal Pin
p.razi15-Dec-07 2:31
p.razi15-Dec-07 2:31 
Generalsoal Pin
p.razi15-Dec-07 2:29
p.razi15-Dec-07 2:29 
Questioni can't try in most cases. Pin
lulukuku11-Nov-07 22:50
lulukuku11-Nov-07 22:50 
GeneralWould you... Pin
Stevie1-Nov-07 0:57
Stevie1-Nov-07 0:57 
GeneralRe: Would you... Pin
Dewey1-Nov-07 7:55
Dewey1-Nov-07 7:55 
GeneralRe: Would you... Pin
Bert delaVega1-Nov-07 10:03
Bert delaVega1-Nov-07 10:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.