Changeset 8538
- Timestamp:
- 08/29/12 16:53:38 (12 years ago)
- Location:
- branches/DatasetFeatureCorrelation
- Files:
-
- 17 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis merged: 8246,8355,8528,8531
- Property svn:mergeinfo changed
-
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged: 8246,8435,8453,8485
- Property svn:mergeinfo changed
-
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r8526 r8538 93 93 </PropertyGroup> 94 94 <ItemGroup> 95 <Reference Include="ALGLIB-3.6.0, Version=3.6.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 95 96 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 96 97 <Reference Include="HeuristicLab.Analysis.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> … … 183 184 <Compile Include="FeatureCorrelationView.Designer.cs"> 184 185 <DependentUpon>FeatureCorrelationView.cs</DependentUpon> 186 </Compile> 187 <Compile Include="Clustering\ClusteringSolutionVisualizationView.cs"> 188 <SubType>UserControl</SubType> 189 </Compile> 190 <Compile Include="Clustering\ClusteringSolutionVisualizationView.Designer.cs"> 191 <DependentUpon>ClusteringSolutionVisualizationView.cs</DependentUpon> 185 192 </Compile> 186 193 <Compile Include="DataAnalysisSolutionEvaluationView.cs"> -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/Plugin.cs.frame
r7294 r8538 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis.Views { 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Views", "Provides views for base classes for data analysis tasks.", "3.4. 2.$WCREV$")]28 [Plugin("HeuristicLab.Problems.DataAnalysis.Views", "Provides views for base classes for data analysis tasks.", "3.4.3.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis.Views-3.4.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.ALGLIB", "3.6.0")] 31 [PluginDependency("HeuristicLab.Analysis", "3.3")] 32 [PluginDependency("HeuristicLab.Collections", "3.3")] 30 33 [PluginDependency("HeuristicLab.Common", "3.3")] 31 34 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/Properties/AssemblyInfo.cs.frame
r7259 r8538 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.4.0.0")] 55 [assembly: AssemblyFileVersion("3.4. 2.$WCREV$")]55 [assembly: AssemblyFileVersion("3.4.3.$WCREV$")] -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartView.cs
r8276 r8538 89 89 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].LegendText = ESTIMATEDVALUES_ALL_SERIES_NAME; 90 90 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.FastLine; 91 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues); 92 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 91 if (allEstimatedValues.Count > 0) { 92 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(allIndices, allEstimatedValues); 93 this.InsertEmptyPoints(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); 94 } 93 95 this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Tag = Content; 94 96 this.ToggleSeriesData(this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME]); … … 224 226 225 227 IEnumerable<int> indices = null; 226 IEnumerable<double>predictedValues = null;228 double[] predictedValues = null; 227 229 switch (series.Name) { 228 230 case ESTIMATEDVALUES_ALL_SERIES_NAME: 229 231 indices = Enumerable.Range(0, Content.ProblemData.Dataset.Rows).Except(Content.ProblemData.TrainingIndices).Except(Content.ProblemData.TestIndices).ToArray(); 230 232 var estimatedValues = Content.EstimatedValues.ToArray(); 231 predictedValues = indices.Select(index => estimatedValues[index]).To List();233 predictedValues = indices.Select(index => estimatedValues[index]).ToArray(); 232 234 break; 233 235 case ESTIMATEDVALUES_TRAINING_SERIES_NAME: … … 240 242 break; 241 243 } 242 series.Points.DataBindXY(indices, predictedValues); 243 this.InsertEmptyPoints(series); 244 if (predictedValues.Length > 0) { 245 series.Points.DataBindXY(indices, predictedValues); 246 this.InsertEmptyPoints(series); 247 } 244 248 chart.Legends[series.Legend].ForeColor = Color.Black; 245 249 UpdateCursorInterval(); -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs
r7259 r8538 95 95 96 96 IClassificationSolution IClassificationModel.CreateClassificationSolution(IClassificationProblemData problemData) { 97 return new ClassificationEnsembleSolution(models, problemData);97 return new ClassificationEnsembleSolution(models, new ClassificationEnsembleProblemData(problemData)); 98 98 } 99 99 #endregion -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
r8276 r8538 104 104 } 105 105 106 public ClassificationEnsembleSolution(IClassificationProblemData problemData) : 107 this(Enumerable.Empty<IClassificationModel>(), problemData) { } 108 106 109 public ClassificationEnsembleSolution(IEnumerable<IClassificationModel> models, IClassificationProblemData problemData) 107 110 : this(models, problemData, -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r8276 r8538 277 277 278 278 public ClassificationProblemData() : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) { } 279 280 public ClassificationProblemData(IClassificationProblemData classificationProblemData) 281 : this(classificationProblemData.Dataset, classificationProblemData.AllowedInputVariables, classificationProblemData.TargetVariable) { 282 TrainingPartition.Start = classificationProblemData.TrainingPartition.Start; 283 TrainingPartition.End = classificationProblemData.TrainingPartition.End; 284 TestPartition.Start = classificationProblemData.TestPartition.Start; 285 TestPartition.End = classificationProblemData.TestPartition.End; 286 } 287 279 288 public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable) 280 289 : base(dataset, allowedInputVariables) { -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs
r8276 r8538 51 51 valueEvaluationCache = new Dictionary<int, double>(); 52 52 classValueEvaluationCache = new Dictionary<int, double>(); 53 54 SetAccuracyMaximizingThresholds();55 53 } 56 54 -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
r8276 r8538 96 96 protected override void OnModelChanged() { 97 97 DeregisterEventHandler(); 98 SetAccuracyMaximizingThresholds();99 98 RegisterEventHandler(); 100 99 base.OnModelChanged(); … … 137 136 } 138 137 139 public void SetAccuracyMaximizingThresholds() {140 double[] classValues;141 double[] thresholds;142 var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);143 AccuracyMaximizationThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);144 145 Model.SetThresholdsAndClassValues(thresholds, classValues);146 }147 148 public void SetClassDistibutionCutPointThresholds() {149 double[] classValues;150 double[] thresholds;151 var targetClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices);152 NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(ProblemData, EstimatedTrainingValues, targetClassValues, out classValues, out thresholds);153 154 Model.SetThresholdsAndClassValues(thresholds, classValues);155 }156 157 138 protected virtual void OnModelThresholdsChanged(EventArgs e) { 158 139 CalculateResults(); -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r7259 r8538 55 55 56 56 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 57 return new ConstantRegressionSolution(this, problemData);57 return new ConstantRegressionSolution(this, new RegressionProblemData(problemData)); 58 58 } 59 59 } -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
r7259 r8538 102 102 103 103 public RegressionEnsembleSolution CreateRegressionSolution(IRegressionProblemData problemData) { 104 return new RegressionEnsembleSolution(this.Models, problemData);104 return new RegressionEnsembleSolution(this.Models, new RegressionEnsembleProblemData(problemData)); 105 105 } 106 106 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r8276 r8538 121 121 : this(defaultDataset, defaultAllowedInputVariables, defaultTargetVariable) { 122 122 } 123 public RegressionProblemData(IRegressionProblemData regressionProblemData) 124 : this(regressionProblemData.Dataset, regressionProblemData.AllowedInputVariables, regressionProblemData.TargetVariable) { 125 TrainingPartition.Start = regressionProblemData.TrainingPartition.Start; 126 TrainingPartition.End = regressionProblemData.TrainingPartition.End; 127 TestPartition.Start = regressionProblemData.TestPartition.Start; 128 TestPartition.End = regressionProblemData.TestPartition.End; 129 } 123 130 124 131 public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable) -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/HoeffdingsDependenceCalculator.cs
r8276 r8538 102 102 103 103 /// <summary> 104 /// Calculates midranks. Source: Numerical Recipes in C. 104 /// Calculates midranks. Source: Numerical Recipes in C. p 642 105 105 /// </summary> 106 106 /// <param name="w">Sorted array of elements, replaces the elements by their rank, including midranking of ties</param> … … 116 116 } else { 117 117 int j; 118 for (j = i + 1; j < n && w[j] <= w[i]; j++) ; // how far does it go (<= effectively means == as w must be sorted )119 double rank = 0.5 * (i + j - 1);118 for (j = i + 1; j < n && w[j] <= w[i]; j++) ; // how far does it go (<= effectively means == as w must be sorted, side-step equality for double values) 119 double rank = 1 + 0.5 * (i + j - 1); 120 120 int k; 121 for (k = i; k < j - 1; k++) w[k] = rank; // set the rank for all tied entries121 for (k = i; k < j; k++) w[k] = rank; // set the rank for all tied entries 122 122 i = j; 123 123 } 124 124 } 125 125 126 if (i == n - 1) w[n - 1] = n - 1; // if the last element was not tied, this is its rank126 if (i == n - 1) w[n - 1] = n; // if the last element was not tied, this is its rank 127 127 } 128 128 } -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame
r8038 r8538 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis { 28 [Plugin("HeuristicLab.Problems.DataAnalysis","Provides base classes for data analysis tasks.", "3.4. 2.$WCREV$")]28 [Plugin("HeuristicLab.Problems.DataAnalysis","Provides base classes for data analysis tasks.", "3.4.3.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis-3.4.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Properties/AssemblyInfo.cs.frame
r7259 r8538 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.4.0.0")] 55 [assembly: AssemblyFileVersion("3.4. 2.$WCREV$")]55 [assembly: AssemblyFileVersion("3.4.3.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.