Changeset 14095 for trunk/sources
- Timestamp:
- 07/18/16 15:23:22 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 deleted
- 15 edited
- 18 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis (added) merged: 13819,13823-13824,13858,13948,13994
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views
- Property svn:mergeinfo changed
/branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views (added) merged: 13810-13812,13816,13823-13824,13856,13858,13948,13994
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj
r13439 r14095 125 125 </ItemGroup> 126 126 <ItemGroup> 127 <Compile Include="GaussianProcessRegressionSolutionEstimatedValuesView.cs">128 <SubType>UserControl</SubType>129 </Compile>130 <Compile Include="GaussianProcessRegressionSolutionEstimatedValuesView.Designer.cs">131 <DependentUpon>GaussianProcessRegressionSolutionEstimatedValuesView.cs</DependentUpon>132 </Compile>133 127 <Compile Include="MeanProdView.cs"> 134 128 <SubType>UserControl</SubType> … … 180 174 </Compile> 181 175 <Compile Include="Plugin.cs" /> 182 <Compile Include="GaussianProcessRegressionSolutionLineChartView.cs">183 <SubType>UserControl</SubType>184 </Compile>185 <Compile Include="GaussianProcessRegressionSolutionLineChartView.Designer.cs">186 <DependentUpon>GaussianProcessRegressionSolutionLineChartView.cs</DependentUpon>187 </Compile>188 176 <Compile Include="SupportVectorMachineModelSupportVectorsView.cs"> 189 177 <SubType>UserControl</SubType> -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessModel.cs
r13941 r14095 341 341 } 342 342 343 public IEnumerable<double> GetEstimatedVariance (IDataset dataset, IEnumerable<int> rows) {343 public IEnumerable<double> GetEstimatedVariances(IDataset dataset, IEnumerable<int> rows) { 344 344 try { 345 345 if (x == null) { -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegressionSolution.cs
r12012 r14095 20 20 #endregion 21 21 22 using System.Collections.Generic;23 using System.Linq;24 22 using HeuristicLab.Common; 25 23 using HeuristicLab.Core; … … 33 31 [Item("GaussianProcessRegressionSolution", "Represents a Gaussian process solution for a regression problem which can be visualized in the GUI.")] 34 32 [StorableClass] 35 public sealed class GaussianProcessRegressionSolution : RegressionSolution, IGaussianProcessSolution { 36 private new readonly Dictionary<int, double> evaluationCache; 33 public sealed class GaussianProcessRegressionSolution : ConfidenceBoundRegressionSolution, IGaussianProcessSolution { 37 34 38 35 public new IGaussianProcessModel Model { … … 44 41 private GaussianProcessRegressionSolution(bool deserializing) 45 42 : base(deserializing) { 46 evaluationCache = new Dictionary<int, double>();47 48 43 } 49 44 private GaussianProcessRegressionSolution(GaussianProcessRegressionSolution original, Cloner cloner) 50 : base(original, cloner) { 51 evaluationCache = new Dictionary<int, double>(original.evaluationCache); 52 } 45 : base(original, cloner) { } 53 46 public GaussianProcessRegressionSolution(IGaussianProcessModel model, IRegressionProblemData problemData) 54 : base(model, problemData) { 55 56 evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows); 57 } 47 : base(model, problemData) { } 58 48 59 49 public override IDeepCloneable Clone(Cloner cloner) { 60 50 return new GaussianProcessRegressionSolution(this, cloner); 61 51 } 62 63 public IEnumerable<double> EstimatedVariance {64 get { return GetEstimatedVariance(Enumerable.Range(0, ProblemData.Dataset.Rows)); }65 }66 public IEnumerable<double> EstimatedTrainingVariance {67 get { return GetEstimatedVariance(ProblemData.TrainingIndices); }68 }69 public IEnumerable<double> EstimatedTestVariance {70 get { return GetEstimatedVariance(ProblemData.TestIndices); }71 }72 73 public IEnumerable<double> GetEstimatedVariance(IEnumerable<int> rows) {74 var rowsToEvaluate = rows.Except(evaluationCache.Keys);75 var rowsEnumerator = rowsToEvaluate.GetEnumerator();76 var valuesEnumerator = Model.GetEstimatedVariance(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();77 78 while (rowsEnumerator.MoveNext() & valuesEnumerator.MoveNext()) {79 evaluationCache.Add(rowsEnumerator.Current, valuesEnumerator.Current);80 }81 82 return rows.Select(row => evaluationCache[row]);83 }84 85 protected override void OnModelChanged() {86 evaluationCache.Clear();87 base.OnModelChanged();88 }89 protected override void OnProblemDataChanged() {90 evaluationCache.Clear();91 base.OnProblemDataChanged();92 }93 52 } 94 53 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeBuilder.cs
r13993 r14095 22 22 23 23 using System; 24 using System.Collections;25 24 using System.Collections.Generic; 26 25 using System.Diagnostics; … … 129 128 130 129 // y and curPred are changed in gradient boosting 131 this.y = y; 132 this.curPred = curPred; 130 this.y = y; 131 this.curPred = curPred; 133 132 134 133 // shuffle row idx -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IGaussianProcessModel.cs
r12509 r14095 20 20 #endregion 21 21 22 using System.Collections.Generic;23 22 using HeuristicLab.Problems.DataAnalysis; 24 23 … … 27 26 /// Interface to represent a Gaussian process posterior 28 27 /// </summary> 29 public interface IGaussianProcessModel : I RegressionModel {28 public interface IGaussianProcessModel : IConfidenceBoundRegressionModel { 30 29 double NegativeLogLikelihood { get; } 31 30 double SigmaNoise { get; } … … 34 33 double[] HyperparameterGradients { get; } 35 34 36 IEnumerable<double> GetEstimatedVariance(IDataset ds, IEnumerable<int> rows);37 35 void FixParameters(); 38 36 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IGaussianProcessSolution.cs
r12012 r14095 26 26 /// Interface to represent a Gaussian process solution (either regression or classification) 27 27 /// </summary> 28 public interface IGaussianProcessSolution : I DataAnalysisSolution {28 public interface IGaussianProcessSolution : IConfidenceBoundRegressionSolution { 29 29 new IGaussianProcessModel Model { get; } 30 30 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis (added) merged: 13819,13823-13824,13831,13858-13859,13948,13994
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r13938 r14095 120 120 </ItemGroup> 121 121 <ItemGroup> 122 <Compile Include="DensityChart.cs"> 123 <SubType>UserControl</SubType> 124 </Compile> 125 <Compile Include="DensityChart.Designer.cs"> 126 <DependentUpon>DensityChart.cs</DependentUpon> 127 </Compile> 128 <Compile Include="DensityTrackbar.cs"> 129 <SubType>UserControl</SubType> 130 </Compile> 131 <Compile Include="DensityTrackbar.Designer.cs"> 132 <DependentUpon>DensityTrackbar.cs</DependentUpon> 133 </Compile> 122 134 <Compile Include="FeatureCorrelation\TimeframeFeatureCorrelationCalculator.cs" /> 123 135 <Compile Include="FeatureCorrelation\AbstractFeatureCorrelationCalculator.cs" /> … … 183 195 <DependentUpon>FeatureCorrelationView.cs</DependentUpon> 184 196 </Compile> 197 <Compile Include="GradientChart.cs"> 198 <SubType>UserControl</SubType> 199 </Compile> 200 <Compile Include="GradientChart.Designer.cs"> 201 <DependentUpon>GradientChart.cs</DependentUpon> 202 </Compile> 203 <Compile Include="GradientChartConfigurationDialog.cs"> 204 <SubType>Form</SubType> 205 </Compile> 206 <Compile Include="GradientChartConfigurationDialog.Designer.cs"> 207 <DependentUpon>GradientChartConfigurationDialog.cs</DependentUpon> 208 </Compile> 185 209 <Compile Include="Interfaces\IDataPreprocessorStarter.cs" /> 186 210 <Compile Include="MenuItems\ShrinkDataAnalysisRunsMenuItem.cs" /> … … 198 222 <DependentUpon>ProblemDataView.cs</DependentUpon> 199 223 </Compile> 224 <Compile Include="Regression\ConfidenceBoundRegressionSolutionEstimatedValuesView.cs"> 225 <SubType>UserControl</SubType> 226 </Compile> 227 <Compile Include="Regression\ConfidenceBoundRegressionSolutionEstimatedValuesView.Designer.cs"> 228 <DependentUpon>ConfidenceBoundRegressionSolutionEstimatedValuesView.cs</DependentUpon> 229 </Compile> 230 <Compile Include="Regression\ConfidenceBoundRegressionSolutionLineChartView.cs"> 231 <SubType>UserControl</SubType> 232 </Compile> 233 <Compile Include="Regression\ConfidenceBoundRegressionSolutionLineChartView.Designer.cs"> 234 <DependentUpon>ConfidenceBoundRegressionSolutionLineChartView.cs</DependentUpon> 235 </Compile> 200 236 <Compile Include="Regression\RegressionEnsembleSolutionModelWeightsView.cs"> 201 237 <SubType>UserControl</SubType> … … 209 245 <Compile Include="Regression\RegressionFeatureCorrelationView.Designer.cs"> 210 246 <DependentUpon>RegressionFeatureCorrelationView.cs</DependentUpon> 247 </Compile> 248 <Compile Include="Regression\RegressionSolutionGradientView.cs"> 249 <SubType>UserControl</SubType> 250 </Compile> 251 <Compile Include="Regression\RegressionSolutionGradientView.Designer.cs"> 252 <DependentUpon>RegressionSolutionGradientView.cs</DependentUpon> 253 </Compile> 254 <Compile Include="Regression\RegressionSolutionTargetResponseGradientView.cs"> 255 <SubType>UserControl</SubType> 256 </Compile> 257 <Compile Include="Regression\RegressionSolutionTargetResponseGradientView.Designer.cs"> 258 <DependentUpon>RegressionSolutionTargetResponseGradientView.cs</DependentUpon> 211 259 </Compile> 212 260 <Compile Include="Regression\RegressionTimeframeFeatureCorrelationView.cs"> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
r13942 r14095 31 31 32 32 namespace HeuristicLab.Problems.DataAnalysis.Views { 33 [View(" RegressionSolution View")]33 [View("Solution View")] 34 34 [Content(typeof(RegressionSolutionBase), false)] 35 35 public partial class RegressionSolutionView : DataAnalysisSolutionView { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r13986 r14095 138 138 <Compile Include="Implementation\ConstantModel.cs" /> 139 139 <Compile Include="Implementation\DataAnalysisModel.cs" /> 140 <Compile Include="Implementation\Regression\ConfidenceBoundRegressionSolution.cs" /> 140 141 <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" /> 141 142 <Compile Include="Implementation\Regression\ConstantRegressionSolution.cs" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionModel.cs
r13921 r14095 27 27 string TargetVariable { get; } 28 28 } 29 30 public interface IConfidenceBoundRegressionModel : IRegressionModel { 31 IEnumerable<double> GetEstimatedVariances(IDataset dataset, IEnumerable<int> rows); 32 } 29 33 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs
r12851 r14095 44 44 double TestRootMeanSquaredError { get; } 45 45 } 46 47 public interface IConfidenceBoundRegressionSolution : IRegressionSolution { 48 new IConfidenceBoundRegressionModel Model { get; } 49 50 IEnumerable<double> EstimatedVariances { get; } 51 IEnumerable<double> EstimatedTrainingVariances { get; } 52 IEnumerable<double> EstimatedTestVariances { get; } 53 IEnumerable<double> GetEstimatedVariances(IEnumerable<int> rows); 54 } 46 55 }
Note: See TracChangeset
for help on using the changeset viewer.