private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Application.Exit(); an.Save("BPNNBrain.net"); dn.Save("SOMBrain.net"); }
void Clustering() { pca = new PrincipalComponentAnalysis(); //pca pca.Learn(inputImgArray.ToArray()); var pcaRes = pca.Transform(inputImgArray.ToArray()); dn = new DistanceNetwork(pcaRes[0].Length, mainForm.closestSquareNumber(totalData)); som = new SOMLearning(dn); Console.WriteLine("Learning"); for (var i = 0; i < maxEpoch; i++) { var error = som.RunEpoch(pcaRes); if (error < errorGoal) { break; } if (i % 10 == 0) { Console.WriteLine($"Report Cluster error {i} : {error}"); } } dn.Save(savedDNNetwork); }
/// <summary> /// Save network to files /// </summary> public void Save() { _clusteringNetwork.Save("SOMBrain.net"); _classificationNetwork.Save("BPNNBrain.net"); }