public List <double> ftop1(int data, int count, int index, double[] wlist, int neuron) { List <double> hostList = obj.fetch(data, count, neuron); List <double> toplam = new List <double>(); List <double> deneme = new List <double>(); second = new ToplamaFonk.second(wlist, hostList); first = new ToplamaFonk.first(wlist, hostList); third = new ToplamaFonk.third(wlist, hostList); if (index == 0) //AgırlıkFonksiyonu { deneme = first.top(data, count, neuron); //for (int i = 0; i < deneme.Count; i++) //{ // MessageBox.Show(deneme[i].ToString()); //} for (int i = 0; i < deneme.Count; i++) { // MessageBox.Show(deneme[i].ToString() + " sayac " + sayac); obj.print((i + 2 + sayac), data + 1, deneme[i]); } sayac = sayac + count; return(deneme); } else if (index == 1) //Çarpım { deneme = second.top(data, count, neuron); for (int i = 0; i < deneme.Count; i++) { obj.print((i + 2 + sayac), data + 1, deneme[i]); } sayac = sayac + count; return(deneme); } else//Maksimum { deneme = third.top(data, count, neuron); for (int i = 0; i < deneme.Count; i++) { obj.print((i + 2 + sayac), data + 1, deneme[i]); } sayac = sayac + count; return(deneme); } }
public void activated(int data, int count, int index, int deger, int neuron) { double[] wlist = new double[count]; wei = new ToplamaFonk.weight(); wlist = wei.wfunc(data, count); List <double> aktif = obj.ftop1(data, count, index, wlist, neuron); List <double> fnet = new List <double>(); first = new AktivasyonFonk.first(); second = new AktivasyonFonk.second(); third = new AktivasyonFonk.third(); if (deger == 0)//Sigmoid { fnet = first.factive(aktif); for (int i = 0; i < fnet.Count; i++) { excel.print((i + 2 + sayac), data + 2, fnet[i]); } sayac = sayac + count; } else if (deger == 1)//Hiperbolik tanjant { fnet = second.factive(aktif); for (int i = 0; i < fnet.Count; i++) { excel.print((i + 2 + sayac), data + 2, fnet[i]); } sayac = sayac + count; } else//Step by Step { fnet = third.factive(aktif); for (int i = 0; i < fnet.Count; i++) { excel.print((i + 2 + sayac), data + 2, fnet[i]); } sayac = sayac + count; } }