Changeset 12850 for branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 08/12/15 10:59:16 (9 years ago)
- Location:
- branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
r12547 r12850 175 175 varNames.Add(((VariableTreeNode)node).VariableName); 176 176 } 177 foreach (var varName in varNames) { 178 strBuilder.Append("double " + varName); 179 if (varName != varNames.Last()) { 180 strBuilder.Append(", "); 181 } 182 } 177 178 var orderedNames = varNames.OrderBy(n => n, new NaturalStringComparer()).Select(n=> "double " + n); 179 strBuilder.Append(string.Join(", ", orderedNames)); 183 180 184 181 strBuilder.AppendLine(") {"); -
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisImpactValuesCalculator.cs
r10469 r12850 6 6 public interface ISymbolicDataAnalysisSolutionImpactValuesCalculator : IItem { 7 7 double CalculateReplacementValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows); 8 double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double originalQuality= double.NaN);8 double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double qualityForImpactsCalculation = double.NaN); 9 9 void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, 10 IEnumerable<int> rows, out double impactValue, out double replacementValue, double originalQuality= double.NaN);10 IEnumerable<int> rows, out double impactValue, out double replacementValue, out double newQualityForImpactsCalculation, double qualityForImpactsCalculation = double.NaN); 11 11 } 12 12 } -
branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12103 r12850 65 65 66 66 OnlineCalculatorError error; 67 var r2 = OnlinePearsonsRSquaredCalculator.Calculate(v1, v2, out error); 67 var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error); 68 69 var r2 = error == OnlineCalculatorError.None ? r * r : 0; 68 70 69 71 if (r2 > 1.0) 70 72 r2 = 1.0; 71 73 72 return error == OnlineCalculatorError.None ? r2 : 0;74 return r2; 73 75 } 74 76 … … 87 89 88 90 OnlineCalculatorError error; 89 var r2 = OnlinePearsonsRSquaredCalculator.Calculate(leftValues, rightValues, out error); 91 var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error); 92 93 var r2 = error == OnlineCalculatorError.None ? r * r : 0; 90 94 91 95 if (r2 > 1.0) 92 r2 = 1.0; // sometimes due to fp errors it can happen that the r2 is over 1 (like 1.0000000009)96 r2 = 1.0; 93 97 94 return error == OnlineCalculatorError.None ? r2 : 0;98 return r2; 95 99 } 96 100 }
Note: See TracChangeset
for help on using the changeset viewer.