static void Main(string[] args) { Routes routes = new Routes(); routes.UploadPoints(ConfigurationSettings.AppSettings["Path"]); kMeanCluster kmeanCluster = new kMeanCluster(); kmeanCluster.setPoint(routes.allPoints); kmeanCluster.clustering(); }
static void Main(string[] args) { Routes routes = new Routes(); routes.UploadPoints(ConfigurationSettings.AppSettings["Path"]); kMeanHierarchy kmeanCluster = new kMeanHierarchy(routes.allPoints); //kmeanCluster.setPoint(routes.allPoints); kmeanCluster.clustering(12); hierarchyCluster hier = new hierarchyCluster(); hier.setClusters(routes.allPoints); hier.clustering(); }
private void button1_Click(object sender, EventArgs e) { Routes routes = new Clustering.Routes(); routes.UploadPoints(ConfigurationSettings.AppSettings["Path"]); kMeanCluster kmeanCluster = new kMeanCluster(); kmeanCluster.setPoint(routes.allPoints); kmeanCluster.clustering(); this.chart1.ChartAreas[0].AxisY.IsStartedFromZero = false; int count = 0; foreach (Cluster cluster in kmeanCluster.clusterList) { this.chart1.Series.Add(new Series(cluster.ToString() + count)); this.chart1.Series[cluster.ToString() + count].IsValueShownAsLabel = false; this.chart1.Series[cluster.ToString() + count].ChartType = SeriesChartType.Point; this.chart1.Series[cluster.ToString() + count].Points.DataBindXY(cluster.getAllX(), cluster.getAllY()); count++; } }