Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/13/11 13:52:22 (13 years ago)
Author:
gkronber
Message:

#1081 implemented remaining metrics for time series prognosis solutions, added estimation limits fixed training and validation best solution analyzers, implemented overfitting analyzer.

Location:
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views-3.4.csproj

    r7154 r7183  
    5050    <DebugType>pdbonly</DebugType>
    5151    <Optimize>true</Optimize>
    52     <OutputPath>bin\Release\</OutputPath>
     52    <OutputPath>..\..\bin\</OutputPath>
    5353    <DefineConstants>TRACE</DefineConstants>
    5454    <ErrorReport>prompt</ErrorReport>
     
    110110  </ItemGroup>
    111111  <ItemGroup>
     112    <Compile Include="InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs">
     113      <SubType>UserControl</SubType>
     114    </Compile>
     115    <Compile Include="InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.Designer.cs">
     116      <DependentUpon>InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs</DependentUpon>
     117    </Compile>
    112118    <Compile Include="Plugin.cs" />
    113119    <Compile Include="SymbolicTimeSeriesPrognosisSolutionView.cs">
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs

    r7154 r7183  
    5757    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree) {
    5858      Dictionary<ISymbolicExpressionTreeNode, double> replacementValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
    59       foreach (ISymbolicExpressionTreeNode node in tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPrefix()) {
    60         replacementValues[node] = CalculateReplacementValue(node, tree);
    61       }
     59      foreach (var componentBranch in tree.Root.GetSubtree(0).Subtrees)
     60        foreach (ISymbolicExpressionTreeNode node in componentBranch.IterateNodesPrefix()) {
     61          replacementValues[node] = CalculateReplacementValue(node, tree);
     62        }
    6263      return replacementValues;
    6364    }
     
    7273        .ToArray();
    7374      int i = 0;
     75      int nTargetVariables = Content.ProblemData.TargetVariables.Count();
    7476      foreach (var targetVariable in Content.ProblemData.TargetVariables) {
    7577        List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(i).IterateNodesPostfix().ToList();
    7678        var targetValues = dataset.GetDoubleValues(targetVariable, rows);
    7779        OnlineCalculatorError errorState;
    78         double originalR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput.Select(v => v.ElementAt(i)), out errorState);
     80        double originalR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput.Skip(i).TakeEvery(nTargetVariables), out errorState);
    7981        if (errorState != OnlineCalculatorError.None) originalR2 = 0.0;
    8082
     
    8587          SwitchNode(parent, node, replacementNode);
    8688          var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, Content.ProblemData.TargetVariables.ToArray(), rows, 1);
    87           double newR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, newOutput.Select(v => v.First().ElementAt(i)), out errorState);
     89          double newR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, newOutput.Skip(i).TakeEvery(nTargetVariables), out errorState);
    8890          if (errorState != OnlineCalculatorError.None) newR2 = 0.0;
    8991
     
    112114      var rows = Content.ProblemData.TrainingIndizes;
    113115      var allPrognosedValues = interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, Content.ProblemData.TargetVariables.ToArray(), rows, 1);
    114      
    115       return allPrognosedValues.Select(x=>x.First().First()).Median();
     116
     117      return allPrognosedValues.Median();
    116118    }
    117119
  • branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.cs

    r7154 r7183  
    3939
    4040    private void btn_SimplifyModel_Click(object sender, EventArgs e) {
    41       //InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView view = new InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView();
    42       //view.Content = (SymbolicTimeSeriesPrognosisSolution)this.Content.Clone();
    43       //view.Show();
     41      InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView view = new InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView();
     42      view.Content = (SymbolicTimeSeriesPrognosisSolution)this.Content.Clone();
     43      view.Show();
    4444    }
    4545  }
Note: See TracChangeset for help on using the changeset viewer.