Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/16 09:47:26 (9 years ago)
Author:
pfleck
Message:

#2597:

  • Added new interface IConfidenceBoundRegressionModel and IConfidenceBoundRegressionSolution for regression models/solutions that support confidence information on estimated samples.
  • Renamed GetEstimatedVariance to GetEstimatedVariances to be consistent with GetEstimatedValues.
Location:
branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis/3.4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessModel.cs

    r13784 r13823  
    346346    }
    347347
    348     public IEnumerable<double> GetEstimatedVariance(IDataset dataset, IEnumerable<int> rows) {
     348    public IEnumerable<double> GetEstimatedVariances(IDataset dataset, IEnumerable<int> rows) {
    349349      try {
    350350        if (x == null) {
  • branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegressionSolution.cs

    r12012 r13823  
    3333  [Item("GaussianProcessRegressionSolution", "Represents a Gaussian process solution for a regression problem which can be visualized in the GUI.")]
    3434  [StorableClass]
    35   public sealed class GaussianProcessRegressionSolution : RegressionSolution, IGaussianProcessSolution {
     35  public sealed class GaussianProcessRegressionSolution : RegressionSolution, IGaussianProcessSolution, IConfidenceBoundRegressionSolution {
    3636    private new readonly Dictionary<int, double> evaluationCache;
    3737
     
    6161    }
    6262
    63     public IEnumerable<double> EstimatedVariance {
    64       get { return GetEstimatedVariance(Enumerable.Range(0, ProblemData.Dataset.Rows)); }
     63    public IEnumerable<double> EstimatedVariances {
     64      get { return GetEstimatedVariances(Enumerable.Range(0, ProblemData.Dataset.Rows)); }
    6565    }
    66     public IEnumerable<double> EstimatedTrainingVariance {
    67       get { return GetEstimatedVariance(ProblemData.TrainingIndices); }
     66    public IEnumerable<double> EstimatedTrainingVariances {
     67      get { return GetEstimatedVariances(ProblemData.TrainingIndices); }
    6868    }
    69     public IEnumerable<double> EstimatedTestVariance {
    70       get { return GetEstimatedVariance(ProblemData.TestIndices); }
     69    public IEnumerable<double> EstimatedTestVariances {
     70      get { return GetEstimatedVariances(ProblemData.TestIndices); }
    7171    }
    7272
    73     public IEnumerable<double> GetEstimatedVariance(IEnumerable<int> rows) {
     73    public IEnumerable<double> GetEstimatedVariances(IEnumerable<int> rows) {
    7474      var rowsToEvaluate = rows.Except(evaluationCache.Keys);
    7575      var rowsEnumerator = rowsToEvaluate.GetEnumerator();
    76       var valuesEnumerator = Model.GetEstimatedVariance(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();
     76      var valuesEnumerator = Model.GetEstimatedVariances(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();
    7777
    7878      while (rowsEnumerator.MoveNext() & valuesEnumerator.MoveNext()) {
  • branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/StudentTProcessModel.cs

    r13784 r13823  
    363363    }
    364364
    365     public IEnumerable<double> GetEstimatedVariance(IDataset dataset, IEnumerable<int> rows) {
     365    public IEnumerable<double> GetEstimatedVariances(IDataset dataset, IEnumerable<int> rows) {
    366366      try {
    367367        if (x == null) {
  • branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IGaussianProcessModel.cs

    r12509 r13823  
    2020#endregion
    2121
    22 using System.Collections.Generic;
    2322using HeuristicLab.Problems.DataAnalysis;
    2423
     
    2726  /// Interface to represent a Gaussian process posterior
    2827  /// </summary>
    29   public interface IGaussianProcessModel : IRegressionModel {
     28  public interface IGaussianProcessModel : IConfidenceBoundRegressionModel {
    3029    double NegativeLogLikelihood { get; }
    3130    double SigmaNoise { get; }
     
    3433    double[] HyperparameterGradients { get; }
    3534
    36     IEnumerable<double> GetEstimatedVariance(IDataset ds, IEnumerable<int> rows);
    3735    void FixParameters();
    3836  }
Note: See TracChangeset for help on using the changeset viewer.