Changeset 17835 for trunk/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 02/12/21 16:26:36 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r17824 r17835 521 521 foreach (KeyValuePair<string, List<IClassificationSolution>> solutions in resultSolutions) { 522 522 // at least one algorithm (GBT with logistic regression loss) produces a classification solution even though the original problem is a regression problem. 523 var targetVariable = solutions.Value.First().ProblemData.TargetVariable;524 523 var dataset = (Dataset)Problem.ProblemData.Dataset; 525 524 if (ShuffleSamples.Value) { … … 527 526 dataset = dataset.Shuffle(random); 528 527 } 529 var problemDataClone = new ClassificationProblemData(dataset, Problem.ProblemData.AllowedInputVariables, targetVariable); 528 var problemData = (IClassificationProblemData)Problem.ProblemData; 529 var problemDataClone = new ClassificationProblemData(dataset, problemData.AllowedInputVariables, problemData.TargetVariable, problemData.ClassNames, problemData.PositiveClass); 530 530 // set partitions of problem data clone correctly 531 531 problemDataClone.TrainingPartition.Start = SamplesStart.Value; problemDataClone.TrainingPartition.End = SamplesEnd.Value;
Note: See TracChangeset
for help on using the changeset viewer.