Changeset 13100 for trunk/sources
- Timestamp:
- 11/02/15 22:32:59 (9 years ago)
- Location:
- trunk/sources
- Files:
-
- 18 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/branches/ClassificationModelComparison/HeuristicLab.Algorithms.DataAnalysis (added) merged: 9070-9071,9074,9119,9135,10553,10556,10568-10570,13081,13085-13086,13089-13092,13098
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/ClassificationModelComparison/HeuristicLab.Algorithms.DataAnalysis.Views merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Algorithms.DataAnalysis.Views 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Algorithms.DataAnalysis.Views 6917-7005 /branches/CloningRefactoring/HeuristicLab.Algorithms.DataAnalysis.Views 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis.Views 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Algorithms.DataAnalysis.Views 5815-6180 /branches/DataAnalysis/HeuristicLab.Algorithms.DataAnalysis.Views 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Algorithms.DataAnalysis.Views 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Algorithms.DataAnalysis.Views 5060 /branches/NET40/sources/HeuristicLab.Algorithms.DataAnalysis.Views 5138-5162 /branches/ParallelEngine/HeuristicLab.Algorithms.DataAnalysis.Views 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Algorithms.DataAnalysis.Views 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Algorithms.DataAnalysis.Views 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Algorithms.DataAnalysis.Views 6828 /branches/RuntimeOptimizer/HeuristicLab.Algorithms.DataAnalysis.Views 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.DataAnalysis.Views 7787-8333 /branches/SlaveShutdown/HeuristicLab.Algorithms.DataAnalysis.Views 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Algorithms.DataAnalysis.Views 5370-5682 /branches/Trunk/HeuristicLab.Algorithms.DataAnalysis.Views 6829-6865 /branches/VNS/HeuristicLab.Algorithms.DataAnalysis.Views 5594-5752 /branches/histogram/HeuristicLab.Algorithms.DataAnalysis.Views 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj
r11623 r13100 166 166 <Compile Include="NcaDimensionReductionView.Designer.cs"> 167 167 <DependentUpon>NcaDimensionReductionView.cs</DependentUpon> 168 </Compile> 169 <Compile Include="OneRClassificationModelView.cs" /> 170 <Compile Include="OneRClassificationModelView.Designer.cs"> 171 <DependentUpon>OneRClassificationModelView.cs</DependentUpon> 168 172 </Compile> 169 173 <Compile Include="Plugin.cs" /> -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
r13065 r13100 96 96 weights = new List<double>(); 97 97 // add constant model 98 models.Add(new Constant RegressionModel(f0));98 models.Add(new ConstantModel(f0)); 99 99 weights.Add(1.0); 100 100 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
r13026 r13100 122 122 </ItemGroup> 123 123 <ItemGroup> 124 <Compile Include="BaselineClassifiers\OneR.cs" /> 125 <Compile Include="BaselineClassifiers\OneRClassificationModel.cs" /> 126 <Compile Include="BaselineClassifiers\OneRClassificationSolution.cs" /> 127 <Compile Include="BaselineClassifiers\ZeroR.cs" /> 124 128 <Compile Include="CrossValidation.cs"> 125 129 <SubType>Code</SubType> -
trunk/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis (added) merged: 9073-9074,9119,10553,10556,13081,13083,13086,13089,13091,13097-13099
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis.Views (added) merged: 9116,9119,9135,10553,10556,10560,13081-13082,13086,13088-13089,13091,13098
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionThresholdView.cs
r12012 r13100 46 46 47 47 private Dictionary<double, Series> classValueSeriesMapping; 48 private Random random;48 private System.Random random; 49 49 private bool updateInProgress; 50 50 … … 54 54 55 55 classValueSeriesMapping = new Dictionary<double, Series>(); 56 random = new Random();56 random = new System.Random(); 57 57 updateInProgress = false; 58 58 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r13003 r13100 137 137 <Compile Include="Classification\ClassificationFeatureCorrelationView.Designer.cs"> 138 138 <DependentUpon>ClassificationFeatureCorrelationView.cs</DependentUpon> 139 </Compile> 140 <Compile Include="Classification\ClassificationSolutionComparisonView.cs" /> 141 <Compile Include="Classification\ClassificationSolutionComparisonView.Designer.cs"> 142 <DependentUpon>ClassificationSolutionComparisonView.cs</DependentUpon> 139 143 </Compile> 140 144 <Compile Include="Classification\ClassificationTimeframeFeatureCorrelationView.cs"> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r13003 r13100 292 292 private IRegressionSolution CreateConstantSolution() { 293 293 double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average(); 294 var model = new Constant RegressionModel(averageTrainingTarget);295 var solution = new ConstantRegressionSolution(model, (IRegressionProblemData)ProblemData.Clone());294 var model = new ConstantModel(averageTrainingTarget); 295 var solution = model.CreateRegressionSolution(ProblemData); 296 296 solution.Name = "Baseline (constant)"; 297 297 return solution; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r12817 r13100 130 130 <Compile Include="Implementation\Classification\ClassificationEnsembleProblemData.cs" /> 131 131 <Compile Include="Implementation\Classification\ClassificationSolutionBase.cs" /> 132 <Compile Include="Implementation\Classification\ConstantClassificationSolution.cs" /> 132 133 <Compile Include="Implementation\Classification\DiscriminantFunctionClassificationSolutionBase.cs" /> 133 134 <Compile Include="Implementation\Clustering\ClusteringProblem.cs" /> 134 135 <Compile Include="Implementation\Clustering\ClusteringProblemData.cs" /> 135 136 <Compile Include="Implementation\Clustering\ClusteringSolution.cs" /> 137 <Compile Include="Implementation\Regression\ConstantModel.cs" /> 136 138 <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" /> 137 139 <Compile Include="Implementation\Regression\ConstantRegressionSolution.cs" /> … … 182 184 <Compile Include="OnlineCalculators\AutoCorrelationCalculator.cs" /> 183 185 <Compile Include="OnlineCalculators\ClassificationPerformanceMeasuresCalculator.cs" /> 186 <Compile Include="OnlineCalculators\ConfusionMatrixCalculator.cs" /> 184 187 <Compile Include="OnlineCalculators\DependencyCalculator\HoeffdingsDependenceCalculator.cs" /> 185 188 <Compile Include="OnlineCalculators\DependencyCalculator\PearsonsRDependenceCalculator.cs" /> 186 189 <Compile Include="OnlineCalculators\DependencyCalculator\PearsonsRSquaredDependenceCalculator.cs" /> 187 190 <Compile Include="OnlineCalculators\DependencyCalculator\SpearmansRankCorrelationCoefficientCalculator.cs" /> 191 <Compile Include="OnlineCalculators\FOneScoreCalculator.cs" /> 192 <Compile Include="OnlineCalculators\MatthewsCorrelationCoefficientCalculator.cs" /> 188 193 <Compile Include="OnlineCalculators\OnlineBoundedMeanSquaredErrorCalculator.cs" /> 189 194 <Compile Include="OnlineCalculators\OnlineCovarianceCalculator.cs" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationPerformanceMeasures.cs
r12012 r13100 37 37 protected const string TrainingFalsePositiveRateResultName = "False positive rate (training)"; 38 38 protected const string TrainingFalseDiscoveryRateResultName = "False discovery rate (training)"; 39 protected const string TrainingF1ScoreResultName = "F1 score (training)"; 40 protected const string TrainingMatthewsCorrelationResultName = "Matthews Correlation (training)"; 39 41 protected const string TestTruePositiveRateResultName = "True positive rate (test)"; 40 42 protected const string TestTrueNegativeRateResultName = "True negative rate (test)"; … … 43 45 protected const string TestFalsePositiveRateResultName = "False positive rate (test)"; 44 46 protected const string TestFalseDiscoveryRateResultName = "False discovery rate (test)"; 47 protected const string TestF1ScoreResultName = "F1 score (test)"; 48 protected const string TestMatthewsCorrelationResultName = "Matthews Correlation (test)"; 45 49 #endregion 46 50 … … 89 93 set { ((DoubleValue)this[TrainingFalseDiscoveryRateResultName].Value).Value = value; } 90 94 } 95 public double TrainingF1Score { 96 get { return ((DoubleValue)this[TrainingF1ScoreResultName].Value).Value; } 97 set { ((DoubleValue)this[TrainingF1ScoreResultName].Value).Value = value; } 98 } 99 public double TrainingMatthewsCorrelation { 100 get { return ((DoubleValue)this[TrainingMatthewsCorrelationResultName].Value).Value; } 101 set { ((DoubleValue)this[TrainingMatthewsCorrelationResultName].Value).Value = value; } 102 } 91 103 public double TestTruePositiveRate { 92 104 get { return ((DoubleValue)this[TestTruePositiveRateResultName].Value).Value; } … … 113 125 set { ((DoubleValue)this[TestFalseDiscoveryRateResultName].Value).Value = value; } 114 126 } 127 public double TestF1Score { 128 get { return ((DoubleValue)this[TestF1ScoreResultName].Value).Value; } 129 set { ((DoubleValue)this[TestF1ScoreResultName].Value).Value = value; } 130 } 131 public double TestMatthewsCorrelation { 132 get { return ((DoubleValue)this[TestMatthewsCorrelationResultName].Value).Value; } 133 set { ((DoubleValue)this[TestMatthewsCorrelationResultName].Value).Value = value; } 134 } 115 135 #endregion 116 136 … … 123 143 Add(new Result(TrainingFalsePositiveRateResultName, "The false positive rate is the complement of the true negative rate of the model on the training partition.", new PercentValue())); 124 144 Add(new Result(TrainingFalseDiscoveryRateResultName, "The false discovery rate is the complement of the positive predictive value of the model on the training partition.", new PercentValue())); 145 Add(new Result(TrainingF1ScoreResultName, "The F1 score of the model on the training partition.", new DoubleValue())); 146 Add(new Result(TrainingMatthewsCorrelationResultName, "The Matthews correlation value of the model on the training partition.", new DoubleValue())); 125 147 Add(new Result(TestTruePositiveRateResultName, "Sensitivity/True positive rate of the model on the test partition\n(TP/(TP+FN)).", new PercentValue())); 126 148 Add(new Result(TestTrueNegativeRateResultName, "Specificity/True negative rate of the model on the test partition\n(TN/(FP+TN)).", new PercentValue())); … … 129 151 Add(new Result(TestFalsePositiveRateResultName, "The false positive rate is the complement of the true negative rate of the model on the test partition.", new PercentValue())); 130 152 Add(new Result(TestFalseDiscoveryRateResultName, "The false discovery rate is the complement of the positive predictive value of the model on the test partition.", new PercentValue())); 153 Add(new Result(TestF1ScoreResultName, "The F1 score of the model on the test partition.", new DoubleValue())); 154 Add(new Result(TrainingMatthewsCorrelationResultName, "The Matthews correlation value of the model on the test partition.", new DoubleValue())); 131 155 TrainingTruePositiveRate = double.NaN; 132 156 TrainingTrueNegativeRate = double.NaN; … … 135 159 TrainingFalsePositiveRate = double.NaN; 136 160 TrainingFalseDiscoveryRate = double.NaN; 161 TrainingF1Score = double.NaN; 162 TrainingMatthewsCorrelation = double.NaN; 137 163 TestTruePositiveRate = double.NaN; 138 164 TestTrueNegativeRate = double.NaN; … … 141 167 TestFalsePositiveRate = double.NaN; 142 168 TestFalseDiscoveryRate = double.NaN; 169 TestF1Score = double.NaN; 170 TestMatthewsCorrelation = double.NaN; 143 171 } 144 172 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
r12012 r13100 26 26 using HeuristicLab.Optimization; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Problems.DataAnalysis.OnlineCalculators; 28 29 29 30 namespace HeuristicLab.Problems.DataAnalysis { … … 135 136 if (testPerformanceCalculator.ErrorState == OnlineCalculatorError.None) 136 137 ClassificationPerformanceMeasures.SetTestResults(testPerformanceCalculator); 138 139 var f1Training = FOneScoreCalculator.Calculate(originalTrainingClassValues, estimatedTrainingClassValues, out errorState); 140 if (errorState == OnlineCalculatorError.None) ClassificationPerformanceMeasures.TrainingF1Score = f1Training; 141 var f1Test = FOneScoreCalculator.Calculate(originalTestClassValues, estimatedTestClassValues, out errorState); 142 if (errorState == OnlineCalculatorError.None) ClassificationPerformanceMeasures.TestF1Score = f1Test; 143 144 145 var mccTraining = MatthewsCorrelationCoefficientCalculator.Calculate(originalTrainingClassValues, estimatedTrainingClassValues, out errorState); 146 if (errorState == OnlineCalculatorError.None) ClassificationPerformanceMeasures.TrainingMatthewsCorrelation = mccTraining; 147 var mccTest = MatthewsCorrelationCoefficientCalculator.Calculate(originalTestClassValues, estimatedTestClassValues, out errorState); 148 if (errorState == OnlineCalculatorError.None) ClassificationPerformanceMeasures.TestMatthewsCorrelation = mccTest; 137 149 } 138 150 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r13001 r13100 31 31 [StorableClass] 32 32 [Item("Constant Regression Model", "A model that always returns the same constant value regardless of the presented input data.")] 33 [Obsolete] 33 34 public class ConstantRegressionModel : NamedItem, IRegressionModel, IStringConvertibleValue { 34 35 [Storable] … … 60 61 61 62 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 62 return new ConstantRegressionSolution( this, new RegressionProblemData(problemData));63 return new ConstantRegressionSolution(new ConstantModel(constant), new RegressionProblemData(problemData)); 63 64 } 64 65 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionSolution.cs
r12012 r13100 28 28 [Item(Name = "Constant Regression Solution", Description = "Represents a constant regression solution (model + data).")] 29 29 public class ConstantRegressionSolution : RegressionSolution { 30 public new Constant RegressionModel Model {31 get { return (Constant RegressionModel)base.Model; }30 public new ConstantModel Model { 31 get { return (ConstantModel)base.Model; } 32 32 set { base.Model = value; } 33 33 } … … 36 36 protected ConstantRegressionSolution(bool deserializing) : base(deserializing) { } 37 37 protected ConstantRegressionSolution(ConstantRegressionSolution original, Cloner cloner) : base(original, cloner) { } 38 public ConstantRegressionSolution(Constant RegressionModel model, IRegressionProblemData problemData)38 public ConstantRegressionSolution(ConstantModel model, IRegressionProblemData problemData) 39 39 : base(model, problemData) { 40 40 RecalculateResults(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/ConstantTimeSeriesPrognosisModel.cs
r12509 r13100 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 29 30 [StorableClass] 30 31 [Item("Constant TimeSeries Model", "A time series model that returns for all prediciton the same constant value.")] 32 [Obsolete] 31 33 public class ConstantTimeSeriesPrognosisModel : ConstantRegressionModel, ITimeSeriesPrognosisModel { 32 34 [StorableConstructor] -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs
r12641 r13100 373 373 //mean model 374 374 double trainingMean = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndices).Average(); 375 var meanModel = new Constant TimeSeriesPrognosisModel(trainingMean);375 var meanModel = new ConstantModel(trainingMean); 376 376 377 377 //AR1 model … … 448 448 //mean model 449 449 double trainingMean = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndices).Average(); 450 var meanModel = new Constant TimeSeriesPrognosisModel(trainingMean);450 var meanModel = new ConstantModel(trainingMean); 451 451 452 452 //AR1 model -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs
r12012 r13100 150 150 OnlineCalculatorError errorState; 151 151 double trainingMean = ProblemData.TrainingIndices.Any() ? ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average() : double.NaN; 152 var meanModel = new Constant TimeSeriesPrognosisModel(trainingMean);152 var meanModel = new ConstantModel(trainingMean); 153 153 154 154 double alpha, beta;
Note: See TracChangeset
for help on using the changeset viewer.