Ejemplo n.º 1
0
        private void ActMain(List <Point> points)
        {
            PlotDrawCount = 0;
            chart1.Series.Clear();

            //kemans draw

            /*
             * var k = 4;
             * var kmeans = new Kmeans(k, points);
             * var loopCount = kmeans.Calculation(1);
             * DrawGraph(kmeans);
             */

            //xmenas draw

            var xMeans        = new Xmeans(points);
            var kmeansResults = xMeans.Calculation();
            var cSum          = kmeansResults.Sum(x => x.ClusterPoints.Count());    //All Point Number

            //Console.WriteLine("{0}", cSum); //debug

            foreach (var mean in kmeansResults)
            {
                DrawGraph(mean);
            }
        }
Ejemplo n.º 2
0
		private void ActMain(List<Point> points)
		{
			PlotDrawCount = 0;
			chart1.Series.Clear();

			//kemans draw
			/*
			var k = 4;
			var kmeans = new Kmeans(k, points);
			var loopCount = kmeans.Calculation(1);
			DrawGraph(kmeans);
			*/

			//xmenas draw

			var xMeans = new Xmeans(points);
			var kmeansResults = xMeans.Calculation();
			var cSum = kmeansResults.Sum(x => x.ClusterPoints.Count()); //All Point Number

			//Console.WriteLine("{0}", cSum); //debug

			foreach (var mean in kmeansResults)
				DrawGraph(mean);
		}