Changeset 16852 for branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities
- Timestamp:
- 04/19/19 15:45:45 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/M5Regression/M5Utilities/RegressionTreeAnalyzer.cs
r16847 r16852 104 104 var training = pd.TrainingIndices.Where(x => !regressionRuleModel.Covers(pd.Dataset, x)).ToArray(); 105 105 var test = pd.TestIndices.Where(x => !regressionRuleModel.Covers(pd.Dataset, x)).ToArray(); 106 var data = new Dataset(pd.Dataset.DoubleVariables, pd.Dataset.DoubleVariables.Select(v => pd.Dataset.GetDoubleValues(v, training.Concat(test)).ToArray())); 107 notCovered = new RegressionProblemData(data, pd.AllowedInputVariables, pd.TargetVariable); 108 notCovered.TestPartition.Start = notCovered.TrainingPartition.End = training.Length; 109 notCovered.TestPartition.End = training.Length + test.Length; 106 if (training.Length > 0 || test.Length > 0) { 107 var data = new Dataset(pd.Dataset.DoubleVariables, pd.Dataset.DoubleVariables.Select(v => pd.Dataset.GetDoubleValues(v, training.Concat(test)).ToArray())); 108 notCovered = new RegressionProblemData(data, pd.AllowedInputVariables, pd.TargetVariable); 109 notCovered.TestPartition.Start = notCovered.TrainingPartition.End = training.Length; 110 notCovered.TestPartition.End = training.Length + test.Length; 111 } else notCovered = null; 110 112 111 113 var training2 = pd.TrainingIndices.Where(x => regressionRuleModel.Covers(pd.Dataset, x)).ToArray();
Note: See TracChangeset
for help on using the changeset viewer.