public void Out(TSOM SOM, string Name) { StreamWriter f = new StreamWriter(Name); for (int i = 0; i < Count; i++) { f.WriteLine("{0}\t{1}", SOM.GetClass(this[i]) + 1, this[i].Name); } f.Close(); }
public TLearning() { TFiler F = new TFiler("a.txt"); TSOM SOM = new TSOM(F.N, 0.1, 0.1); F.Normalize(); for (int i = 0; i < F.Count; i++) { SOM.Add(F[i], 0); } Console.WriteLine("Количество классов = {0}", SOM.Count); F.Out(SOM, "b.txt"); }