- Timestamp:
- 05/18/20 13:14:56 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis.Views merged: 17539
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.cs
r17457 r17543 88 88 var ds = problemData.Dataset; 89 89 var runs = new RunCollection(); 90 // determine relevant variables (at least two different values) 91 var doubleVars = ds.DoubleVariables. Where(vn => ds.GetDoubleValues(vn).Distinct().Skip(1).Any()).ToArray();92 var stringVars = ds.StringVariables. Where(vn => ds.GetStringValues(vn).Distinct().Skip(1).Any()).ToArray();93 var dateTimeVars = ds.DateTimeVariables. Where(vn => ds.GetDateTimeValues(vn).Distinct().Skip(1).Any()).ToArray();90 91 var doubleVars = ds.DoubleVariables.ToArray(); 92 var stringVars = ds.StringVariables.ToArray(); 93 var dateTimeVars = ds.DateTimeVariables.ToArray(); 94 94 95 95 var predictedValues = Content.EstimatedValues.ToArray(); 96 var targetValues = ds.GetReadOnlyDoubleValues(problemData.TargetVariable); 97 96 98 foreach (var i in problemData.AllIndices) { 97 99 var run = CreateRunForIdx(i, problemData, doubleVars, stringVars, dateTimeVars); 98 var targetValue = ds.GetDoubleValue(problemData.TargetVariable, i); 99 AddErrors(run, predictedValues[i], targetValue); 100 AddErrors(run, predictedValues[i], targetValues[i]); 100 101 101 102 if (problemData.IsTrainingSample(i) && problemData.IsTestSample(i)) { … … 125 126 } 126 127 127 private void AddErrors(IRun run, double pred, double target) {128 private static void AddErrors(IRun run, double pred, double target) { 128 129 var residual = target - pred; 129 130 var relError = residual / target; … … 136 137 } 137 138 138 private IRun CreateRunForIdx(int i, IRegressionProblemData problemData, IEnumerable<string> doubleVars, IEnumerable<string> stringVars, IEnumerable<string> dateTimeVars) {139 private static IRun CreateRunForIdx(int i, IRegressionProblemData problemData, IEnumerable<string> doubleVars, IEnumerable<string> stringVars, IEnumerable<string> dateTimeVars) { 139 140 var ds = problemData.Dataset; 140 141 var run = new Run(); -
branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/DeepCloneableCloningTest.cs
r17526 r17543 83 83 bool success = true; 84 84 foreach (Type deepCloneableType in ApplicationManager.Manager.GetTypes(typeof(IDeepCloneable))) { 85 // skip types that explicit ely choose not to deep-clone every member85 // skip types that explicitly choose not to deep-clone every member 86 86 if (excludedTypes.Contains(deepCloneableType)) continue; 87 87 // test only types contained in HL plugin assemblies
Note: See TracChangeset
for help on using the changeset viewer.