Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4484


Ignore:
Timestamp:
09/24/10 10:28:08 (14 years ago)
Author:
gkronber
Message:

Minor bug fixes in data analysis exploration branch. #1142

Location:
branches/DataAnalysis
Files:
2 edited

Legend:

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

    r4475 r4484  
    322322
    323323      SymbolicRegressionSolution bestTrainingSolution = new SymbolicRegressionSolution((DataAnalysisProblemData)ProblemData.Clone(),
    324         new SymbolicRegressionModel(SymbolicExpressionTreeInterpreter, scaledBestTrainingTree),
     324        new SymbolicRegressionModel((ISymbolicExpressionTreeInterpreter)SymbolicExpressionTreeInterpreter.Clone(), scaledBestTrainingTree),
    325325        lowerEstimationLimit, upperEstimationLimit);
    326326      bestTrainingSolution.Name = "Best solution (training)";
  • branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.Views/3.3/DataAnalysisProblemDataCorrelationsView.cs

    r4197 r4484  
    4646    protected override void OnContentChanged() {
    4747      base.OnContentChanged();
    48       StringBuilder s = new StringBuilder();
    49       Dataset ds = Content.Dataset;
    50       for (int i=0;i<ds.Columns - 1;i++) {
    51         for (int j = i + 1; j < ds.Columns;j++ ) {
    52           string a = ds.GetVariableName(i);
    53           string b = ds.GetVariableName(j);
    54           double[] var0 = ds.GetEnumeratedVariableValues(a).ToArray();
    55           double[] var1 = ds.GetEnumeratedVariableValues(b).ToArray();
    56           double r = alglib.correlation.spearmanrankcorrelation(var0, var1, var0.Length);
    57           double bothtails, temp;
    58           bothtails = temp = 0.0;
    59           alglib.correlationtests.spearmanrankcorrelationsignificance(r, var0.Length, ref bothtails, ref temp, ref temp);
    60           if(bothtails < 0.001 && r > 0.85) s.AppendLine(a + " -- " + b + " [len=\"" + 1.0/(r*r) + "\"];");
     48      if (Content != null) {
     49        StringBuilder s = new StringBuilder();
     50        Dataset ds = Content.Dataset;
     51        for (int i = 0; i < ds.Columns - 1; i++) {
     52          for (int j = i + 1; j < ds.Columns; j++) {
     53            string a = ds.GetVariableName(i);
     54            string b = ds.GetVariableName(j);
     55            double[] var0 = ds.GetEnumeratedVariableValues(a).ToArray();
     56            double[] var1 = ds.GetEnumeratedVariableValues(b).ToArray();
     57            double r = alglib.correlation.spearmanrankcorrelation(var0, var1, var0.Length);
     58            double bothtails, temp;
     59            bothtails = temp = 0.0;
     60            alglib.correlationtests.spearmanrankcorrelationsignificance(r, var0.Length, ref bothtails, ref temp, ref temp);
     61            if (bothtails < 0.001 && r > 0.85) s.AppendLine(a + " -- " + b + " [len=\"" + 1.0 / (r * r) + "\"];");
     62          }
    6163        }
     64
     65        textBox.Text = s.ToString();
    6266      }
    63 
    64       textBox.Text = s.ToString();
    6567    }
    6668  }
Note: See TracChangeset for help on using the changeset viewer.