- Timestamp:
- 12/20/11 13:54:57 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 3 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:ignore
-
old new 4 4 *.suo 5 5 *.vsp 6 Doxygen 6 7 Google.ProtocolBuffers-0.9.1.dll 7 8 HeuristicLab 3.3.5.1.ReSharper.user 8 9 HeuristicLab 3.3.6.0.ReSharper.user 9 10 HeuristicLab.4.5.resharper.user 11 HeuristicLab.ExtLibs.6.0.ReSharper.user 10 12 HeuristicLab.resharper.user 11 13 ProtoGen.exe … … 16 18 bin 17 19 protoc.exe 18 HeuristicLab.ExtLibs.6.0.ReSharper.user19 Doxygen
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationEnsembleSolutionEstimatedClassValuesView.cs
r6982 r7215 24 24 using System.Linq; 25 25 using System.Windows.Forms; 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Data; 27 28 using HeuristicLab.MainForm; … … 96 97 97 98 int classValuesCount = Content.ProblemData.ClassValues.Count; 98 int modelCount = Content.Model.Models.Count();99 string[,] values = new string[indizes.Length, 5 + classValuesCount + modelCount];99 int solutionsCount = Content.ClassificationSolutions.Count(); 100 string[,] values = new string[indizes.Length, 5 + classValuesCount + solutionsCount]; 100 101 double[] target = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable).ToArray(); 101 102 List<List<double?>> estimatedValuesVector = GetEstimatedValues(SamplesComboBox.SelectedItem.ToString(), indizes, … … 107 108 values[i, 1] = target[i].ToString(); 108 109 //display only indices and target values if no models are present 109 if (i >= estimatedClassValues.Length) continue; 110 111 values[i, 2] = estimatedClassValues[i].ToString(); 112 values[i, 3] = (target[i] == estimatedClassValues[i]).ToString(); 113 var groups = estimatedValuesVector[i].GroupBy(x => x).Select(g => new { Key = g.Key, Count = g.Count() }).ToList(); 114 var estimationCount = groups.Where(g => g.Key != null).Select(g => g.Count).Sum(); 115 values[i, 4] = (((double)groups.Where(g => g.Key == estimatedClassValues[i]).Single().Count) / estimationCount).ToString(); 116 for (int classIndex = 0; classIndex < Content.ProblemData.ClassValues.Count; classIndex++) { 117 var group = groups.Where(g => g.Key == Content.ProblemData.ClassValues[classIndex]).SingleOrDefault(); 118 if (group == null) values[i, 5 + classIndex] = 0.ToString(); 119 else values[i, 5 + classIndex] = group.Count.ToString(); 110 if (solutionsCount > 0) { 111 values[i, 2] = estimatedClassValues[i].ToString(); 112 values[i, 3] = (target[i].IsAlmost(estimatedClassValues[i])).ToString(); 113 var groups = 114 estimatedValuesVector[i].GroupBy(x => x).Select(g => new { Key = g.Key, Count = g.Count() }).ToList(); 115 var estimationCount = groups.Where(g => g.Key != null).Select(g => g.Count).Sum(); 116 values[i, 4] = 117 (((double)groups.Where(g => g.Key == estimatedClassValues[i]).Single().Count) / estimationCount).ToString(); 118 for (int classIndex = 0; classIndex < Content.ProblemData.ClassValues.Count; classIndex++) { 119 var group = groups.Where(g => g.Key == Content.ProblemData.ClassValues[classIndex]).SingleOrDefault(); 120 if (group == null) values[i, 5 + classIndex] = 0.ToString(); 121 else values[i, 5 + classIndex] = group.Count.ToString(); 122 } 123 for (int modelIndex = 0; modelIndex < estimatedValuesVector[i].Count; modelIndex++) { 124 values[i, 5 + classValuesCount + modelIndex] = estimatedValuesVector[i][modelIndex] == null 125 ? string.Empty 126 : estimatedValuesVector[i][modelIndex].ToString(); 127 } 120 128 } 121 for (int modelIndex = 0; modelIndex < estimatedValuesVector[i].Count; modelIndex++) {122 values[i, 5 + classValuesCount + modelIndex] = estimatedValuesVector[i][modelIndex] == null123 ? string.Empty124 : estimatedValuesVector[i][modelIndex].ToString();125 }126 127 129 } 128 130 -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r6866 r7215 122 122 <DependentUpon>ClassificationEnsembleSolutionModelView.cs</DependentUpon> 123 123 </Compile> 124 <Compile Include="Plugin.cs" />125 <Compile Include="Solution Views\TimeSeriesPrognosisSolutionView.cs">126 <SubType>UserControl</SubType>127 </Compile>128 <Compile Include="Solution Views\TimeSeriesPrognosisSolutionView.Designer.cs">129 <DependentUpon>TimeSeriesPrognosisSolutionView.cs</DependentUpon>130 </Compile>131 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView.cs">132 <SubType>UserControl</SubType>133 </Compile>134 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView.Designer.cs">135 <DependentUpon>TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView.cs</DependentUpon>136 </Compile>137 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionLineChartView.cs">138 <SubType>UserControl</SubType>139 </Compile>140 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionLineChartView.Designer.cs">141 <DependentUpon>TimeSeriesPrognosisSolutionLineChartView.cs</DependentUpon>142 </Compile>143 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionPrognosedValuesView.cs">144 <SubType>UserControl</SubType>145 </Compile>146 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionPrognosedValuesView.Designer.cs">147 <DependentUpon>TimeSeriesPrognosisSolutionPrognosedValuesView.cs</DependentUpon>148 </Compile>149 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionScatterPlotView.cs">150 <SubType>UserControl</SubType>151 </Compile>152 <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisSolutionScatterPlotView.Designer.cs">153 <DependentUpon>TimeSeriesPrognosisSolutionScatterPlotView.cs</DependentUpon>154 </Compile>155 124 <Compile Include="DataAnalysisSolutionEvaluationView.cs"> 156 125 <SubType>UserControl</SubType> … … 159 128 <DependentUpon>DataAnalysisSolutionEvaluationView.cs</DependentUpon> 160 129 </Compile> 130 <Compile Include="Plugin.cs" /> 161 131 <Compile Include="Regression\RegressionSolutionErrorCharacteristicsCurveView.cs"> 162 132 <SubType>UserControl</SubType> -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs
r6642 r7215 49 49 this.chart.TabIndex = 0; 50 50 this.chart.Text = "chart"; 51 this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown); 51 52 // 52 53 // label1 -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r6982 r7215 31 31 [Content(typeof(IRegressionSolution))] 32 32 public partial class RegressionSolutionErrorCharacteristicsCurveView : DataAnalysisSolutionEvaluationView { 33 private IRegressionSolution constantModel; 33 34 protected const string TrainingSamples = "Training"; 34 35 protected const string TestSamples = "Test"; … … 101 102 if (Content == null) return; 102 103 103 var originalValues = GetOriginalValues(); 104 var meanModelEstimatedValues = GetMeanModelEstimatedValues(originalValues); 104 var originalValues = GetOriginalValues().ToList(); 105 constantModel = CreateConstantModel(); 106 var meanModelEstimatedValues = GetEstimatedValues(constantModel); 105 107 var meanModelResiduals = GetResiduals(originalValues, meanModelEstimatedValues); 106 108 … … 113 115 UpdateSeries(meanModelResiduals, meanModelSeries); 114 116 meanModelSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(meanModelSeries); 117 meanModelSeries.Tag = constantModel; 115 118 chart.Series.Add(meanModelSeries); 116 119 … … 225 228 else UpdateChart(); 226 229 } 230 231 #region Mean Model 232 private void chart_MouseDown(object sender, MouseEventArgs e) { 233 if (e.Clicks < 2) return; 234 HitTestResult result = chart.HitTest(e.X, e.Y); 235 if (result.ChartElementType != ChartElementType.LegendItem) return; 236 if (result.Series.Name != constantModel.Name) return; 237 238 MainFormManager.MainForm.ShowContent((IRegressionSolution)result.Series.Tag); 239 } 240 241 private IRegressionSolution CreateConstantModel() { 242 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average(); 243 var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData); 244 solution.Name = "Mean Model"; 245 return solution; 246 } 247 #endregion 227 248 } 228 249 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/ClassificationEnsembleSolutionView.cs
r6666 r7215 37 37 } 38 38 39 protected override void OnContentChanged() { 40 base.OnContentChanged(); 41 itemsListView.Items.Remove(itemsListView.FindItemWithText("Model: ClassificationEnsembleModel")); 42 } 43 39 44 #region drag & drop 40 45 protected override void itemsListView_DragDrop(object sender, DragEventArgs e) { -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionEnsembleSolutionView.cs
r6666 r7215 37 37 } 38 38 39 protected override void OnContentChanged() { 40 base.OnContentChanged(); 41 itemsListView.Items.Remove(itemsListView.FindItemWithText("Model: RegressionEnsembleModel")); 42 } 43 39 44 #region drag & drop 40 45 protected override void itemsListView_DragDrop(object sender, DragEventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.