Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4945 for trunk


Ignore:
Timestamp:
11/26/10 13:40:42 (14 years ago)
Author:
mkommend
Message:

Changed VariableFrequencyAnalyzers to trace only used variables (ticket #1246).

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionVariableFrequencyAnalyzer.cs

    r4722 r4945  
    7979      ItemArray<SymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue;
    8080      DataAnalysisProblemData problemData = ProblemDataParameter.ActualValue;
    81       var inputVariables = problemData.InputVariables.Select(x => x.Value);
     81      var inputVariables = problemData.InputVariables.CheckedItems.Select(x => x.Value.Value);
    8282      ResultCollection results = ResultsParameter.ActualValue;
    8383
    8484      if (VariableFrequencies == null) {
    8585        VariableFrequencies = new DataTable("Variable frequencies", "Relative frequency of variable references aggregated over the whole population.");
     86        VariableFrequencies.VisualProperties.XAxisTitle = "Generations";
     87        VariableFrequencies.VisualProperties.YAxisTitle = "Relative Variable Frequencies";
    8688        // add a data row for each input variable
    87         foreach (var inputVariable in inputVariables)
    88           VariableFrequencies.Rows.Add(new DataRow(inputVariable));
     89        foreach (var inputVariable in inputVariables) {
     90          DataRow row = new DataRow(inputVariable);
     91          row.VisualProperties.StartIndexZero = true;
     92          VariableFrequencies.Rows.Add(row);
     93        }
    8994        results.Add(new Result("Variable frequencies", VariableFrequencies));
    9095      }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/VariableFrequencyAnalyser.cs

    r4722 r4945  
    7575
    7676    public override IOperation Apply() {
    77       var inputVariables = DataAnalysisProblemData.InputVariables.Select(x => x.Value);
     77      var inputVariables = DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value);
    7878      if (VariableFrequencies == null) {
    7979        VariableFrequencies = new DoubleMatrix(0, 1, inputVariables);
Note: See TracChangeset for help on using the changeset viewer.