Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/11/10 13:01:40 (14 years ago)
Author:
gkronber
Message:

Created a feature/exploration branch for new data analysis features #1142

Location:
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression
Files:
2 edited
10 copied

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs

    r4068 r4195  
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929using HeuristicLab.Problems.DataAnalysis.Evaluators;
     30using HeuristicLab.Analysis;
    3031
    3132namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
     
    169170        if (CurrentGeneration != null) // this check is needed because linear regression solutions do not have a generations parameter
    170171          results[BestSolutionGeneration].Value = new IntValue(CurrentGeneration.Value);
     172        var solutionQualityTable = (DataTable)results["Best solution quality table"].Value;
     173        solutionQualityTable.Rows["Training R²"].Values.Add(trainingR2);
     174        solutionQualityTable.Rows["Training MSE"].Values.Add(trainingMse);
     175        solutionQualityTable.Rows["Test R²"].Values.Add(testR2);
     176        solutionQualityTable.Rows["Test MSE"].Values.Add(testMse);
    171177      } else {
    172178        results.Add(new Result(BestSolutionResultName, solution));
     
    179185        if (CurrentGeneration != null)
    180186          results.Add(new Result(BestSolutionGeneration, new IntValue(CurrentGeneration.Value)));
     187        var solutionQualityTable = new DataTable("Best solution quality table");
     188        solutionQualityTable.Rows.Add(new DataRow("Training R²"));
     189        solutionQualityTable.Rows.Add(new DataRow("Training MSE"));
     190        solutionQualityTable.Rows.Add(new DataRow("Test R²"));
     191        solutionQualityTable.Rows.Add(new DataRow("Test MSE"));
     192        solutionQualityTable.Rows["Training R²"].Values.Add(trainingR2);
     193        solutionQualityTable.Rows["Training MSE"].Values.Add(trainingMse);
     194        solutionQualityTable.Rows["Test R²"].Values.Add(testR2);
     195        solutionQualityTable.Rows["Test MSE"].Values.Add(testMse);
     196        results.Add(new Result("Best solution quality table", solutionQualityTable));
    181197      }
    182198      #endregion
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/BestSymbolicRegressionSolutionAnalyzer.cs

    r4125 r4195  
    4040    private const string VariableImpactsResultName = "Integrated variable frequencies";
    4141    private const string BestSolutionParameterName = "BestSolution";
     42    private const string BestSolutionComplexity = "Best solution complexity";
    4243
    4344    #region parameter properties
     
    110111        results[BestSolutionInputvariableCountResultName].Value = new IntValue(bestSolution.Model.InputVariables.Count());
    111112        results[VariableImpactsResultName].Value = CalculateVariableImpacts(variableFrequencies);
     113        var sizeTable = (DataTable)results[BestSolutionComplexity].Value;
     114        sizeTable.Rows["Best solution size"].Values.Add(bestSolution.Model.SymbolicExpressionTree.Size);
     115        sizeTable.Rows["Best solution height"].Values.Add(bestSolution.Model.SymbolicExpressionTree.Height);
     116        sizeTable.Rows["Best solution variables"].Values.Add(bestSolution.Model.InputVariables.Count());
    112117      } else {
    113118        results.Add(new Result(BestSolutionInputvariableCountResultName, new IntValue(bestSolution.Model.InputVariables.Count())));
    114119        results.Add(new Result(VariableImpactsResultName, CalculateVariableImpacts(variableFrequencies)));
     120        var sizeTable = new DataTable("Best solution complexity");
     121        sizeTable.Rows.Add(new DataRow("Best solution size"));
     122        sizeTable.Rows.Add(new DataRow("Best solution height"));
     123        sizeTable.Rows.Add(new DataRow("Best solution variables"));
     124        sizeTable.Rows["Best solution size"].Values.Add(bestSolution.Model.SymbolicExpressionTree.Size);
     125        sizeTable.Rows["Best solution height"].Values.Add(bestSolution.Model.SymbolicExpressionTree.Height);
     126        sizeTable.Rows["Best solution variables"].Values.Add(bestSolution.Model.InputVariables.Count());
     127        results.Add(new Result(BestSolutionComplexity, sizeTable));
    115128      }
    116129    }
Note: See TracChangeset for help on using the changeset viewer.