private void SelectResults(string fileName, ClusterEvaluationResults config) { this._selectedResults = config; this._lvhClusters.Clear(); this._chartParameters.Clear(); this._tvStatistics.Nodes.Clear(); this._lvhConfigs.Clear(); this._chcClusters.ClearPlot(); this._labelCluster.Text = "Cluster"; this._lblPlot.Text = "Plot"; if (config == null) { this.Text = "Evaluate Clustering"; this.ctlTitleBar1.SubText = string.Empty; return; } this.ctlTitleBar1.SubText = config.ToString(); this.Text = "Evaluate Clustering - " + fileName; this._lvhConfigs.DivertList <ClusterEvaluationParameterResult>(config.Results); List <ColumnWrapper> cols2 = new List <ColumnWrapper>(); ClusterEvaluationParameterResult def = config.Results.FirstOrDefault(); if (def != null) { var cols = ColumnManager.GetColumns(this._core, def); foreach (Column <ClusterEvaluationParameterResult> col in cols) { if (col.Provider != null) { cols2.Add(new ColumnWrapper(config, col)); } } } this._lstSel.Items.Clear(); this._lstSel.Items.Add("(All test repetitions)"); for (int n = 0; n < config.Configuration.NumberOfRepeats; n++) { this._lstSel.Items.Add("Test " + (n + 1)); } this._lvhStatistics.DivertList <ColumnWrapper>(cols2); this.PopulateTreeView(config, cols2); this._infoLabel.Text = "Loaded results"; }
private void _lstClusters_SelectedIndexChanged(object sender, EventArgs e) { this.BeginWait(this._tlpHeaderCluster); if (this._lvhClusters.HasSelection) { var cluster = ((Cluster)this._lvhClusters.Selection); var toPlot = cluster.CreateStylisedCluster(this._core, null); ClusterEvaluationParameterResult sel = (ClusterEvaluationParameterResult)this._lvhConfigs.Selection; this._chcClusters.Plot(toPlot); this._labelCluster.Text = "Cluster (" + sel.Owner.ParameterName + " = " + sel.DisplayName + " / cluster " + cluster.ShortName + ")"; this._infoLabel.Text = "Cluster " + cluster.ShortName + " contains " + cluster.Assignments.Count + " assignments"; } else { this._labelCluster.Text = "Cluster"; this._infoLabel.Text = "No cluster selected"; } this.EndWait(this._tlpHeaderCluster); }
private void _lstParams_SelectedIndexChanged(object sender, EventArgs e) { this.BeginWait(this._tlpHeaderClusters); ClusterEvaluationParameterResult sel = (ClusterEvaluationParameterResult)this._lvhConfigs.Selection; if (sel != null) { this.label2.Text = "Clusters (" + sel.Owner.ParameterName + " = " + sel.DisplayName + ")"; if (this._lstSel.SelectedIndex <= 0) { List <Cluster> all = new List <Cluster>(); bool success = false; int minCount = int.MaxValue; int maxCount = int.MinValue; foreach (var rep in sel.Repetitions) { if (rep.Clusters != null) { all.AddRange(rep.Clusters); success = true; minCount = Math.Min(rep.Clusters.Length, minCount); maxCount = Math.Max(rep.Clusters.Length, maxCount); } } this._lvhClusters.Visible = false; this._lvhClusters.DivertList <Cluster>(all); this._lvhClusters.Visible = true; this.panel2.Visible = success; if (success) { this._infoLabel.Text = "Between " + minCount + " and " + maxCount + " clusters were generated for each of the " + sel.Repetitions.Count + " tests when " + sel.Owner.ParameterName + " = " + sel.DisplayName; } else { this._infoLabel.Text = "Clustering results for this test have been removed by the user and are not available to display"; } } else { ResultClusterer rep = sel.Repetitions[this._lstSel.SelectedIndex - 1]; this._lstClusters.Visible = false; this._lvhClusters.DivertList <Cluster>(rep.Clusters); this._lstClusters.Visible = true; this._infoLabel.Text = "There are " + rep.Clusters.Length + " clusters when " + sel.Owner.ParameterName + " = " + sel.DisplayName + " for " + this._lstSel.SelectedItem; } } else { this.label2.Text = "Clusters"; this._infoLabel.Text = "No parameter selected"; } this.EndWait(this._tlpHeaderClusters); }