public static void Final(Graphique G) { Element.InitSpirale(); List <Element> data = Element.List; //////////////////////////////////////////////////////////////////////// int round_nbr = 2000; // gradient descent loop for (int round = 0; round < round_nbr; round++) { float data_loss = 0; if (round % 20 == 0) { G.ClearBlack(); DrawScore(); G.DrawAxis(); G.DrawData(); Form1.Schema.Invalidate(); Form1.Schema.Update(); Form1.iteration2.Text += "Iteration " + round + " : Loss = " + data_loss + "\r\n"; Form1.iteration2.Update(); } } }
public static void Final(Graphique G) { List <Element> data = Element.List; Form1.iteration.Text = ""; int K = 3; // nombre de classes int D = 3; // dimension 2 + 1 for the biais Matrix W = new Matrix(K, D); W.RandomInit(); double data_loss = 0; ////////////////////////////////////////////////////////////////////////////////////////////// // gradient descent loop for (int round = 0; round < 200; round++) { ///////////////////////////////////////////////////////////////////////////////////////// if (round % 10 == 0) { G.ClearBlack(); DrawScore(W.matrix); G.DrawAxis(); G.DrawData(); Form1.Schema.Invalidate(); Form1.Schema.Update(); Form1.iteration.Text += "Iteration " + round + " : Loss = " + data_loss + "\r\n"; Form1.iteration.Update(); } } }
private void DrawData(object sender, EventArgs e) { G.ClearWhite(); G.DrawAxis(); G.DrawData(); Form1.Schema.Invalidate(); Form1.Schema.Update(); }