- Timestamp:
- 07/08/15 15:32:12 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 12641,12645,12674
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectivePruningAnalyzer.cs
r12361 r12689 206 206 var qualities = Quality.Select(x => x.Value).ToArray(); 207 207 var indices = Enumerable.Range(0, qualities.Length).ToArray(); 208 Array.Sort(qualities, indices); 208 indices.StableSort((a, b) => qualities[a].CompareTo(qualities[b])); 209 209 210 if (!Maximization.Value) Array.Reverse(indices); 210 211 … … 214 215 var empty = new EmptyOperator(); 215 216 216 for (int i = 0; i < subscopes.Count; ++i) {217 for (int i = 0; i < indices.Length; ++i) { 217 218 IOperator @operator; 218 219 if (range.Start <= i && i < range.End && random.NextDouble() <= PruningProbability) -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionCSharpFormatter.cs
r12434 r12689 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/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
r12103 r12689 65 65 66 66 OnlineCalculatorError error; 67 var r 2 = OnlinePearsonsRSquaredCalculator.Calculate(v1, v2, out error);67 var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error); 68 68 69 if (r 2> 1.0)70 r 2= 1.0;69 if (r > 1.0) 70 r = 1.0; 71 71 72 return error == OnlineCalculatorError.None ? r 2: 0;72 return error == OnlineCalculatorError.None ? r*r : 0; 73 73 } 74 74 … … 87 87 88 88 OnlineCalculatorError error; 89 var r 2 = OnlinePearsonsRSquaredCalculator.Calculate(leftValues, rightValues, out error);89 var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error); 90 90 91 if (r 2> 1.0)92 r 2 = 1.0; // sometimes due to fp errors it can happen that the r2is over 1 (like 1.0000000009)91 if (r > 1.0) 92 r = 1.0; // sometimes due to fp errors it can happen that the correlation is over 1 (like 1.0000000009) 93 93 94 return error == OnlineCalculatorError.None ? r 2: 0;94 return error == OnlineCalculatorError.None ? r*r : 0; 95 95 } 96 96 }
Note: See TracChangeset
for help on using the changeset viewer.