** Hai friends, need your help i have done code for similarity alphabet for example if we write A it will recognize A vs B= A A vs C = A and so on.. as i shown in the picture below. But i dont know how to change the A vs B = A (to percentage) like A vs B= 0.15. Thank You
**
private void Recognize(object sender, EventArgs e)
{
lblResult.Visible = false;
lblPreResult.Visible = false;
double[] input = picRecognition.Letter.GetEquivalentVector(20, 20);
int winner = 0;
int current = 1;
lstSimilarityTests.Items.Clear();
picCompressed.Invalidate();
lblResult.Text = "";
while (current < Alphabet.LetterCount)
{
try
{
using (Stream stream = File.Open(Application.StartupPath + @"\Networks\" + winner.ToString("00") + current.ToString("00") + ".ndn", FileMode.Open))
{
IFormatter formatter = new BinaryFormatter(); // database connection
INetwork network = (INetwork)formatter.Deserialize(stream);
double[] output = network.Run(input);
string result = letters[winner] + " vs " + letters[current] + " = ";
if (output[1] > output[0])
{
winner = current;
}
result += letters[winner];
lstSimilarityTests.Items.Add(result);
lstSimilarityTests.TopIndex = lstSimilarityTests.Items.Count - (int)(lstSimilarityTests.Height / lstSimilarityTests.ItemHeight);
}
current++;
}
catch (Exception)
{
MessageBox.Show("Failed to load saved neural networks", "Critical Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
}
lblResult.Text = letters[winner];
lblResult.Visible = true;
lblPreResult.Visible = true;
}