Changeset 131
- Timestamp:
- 04/18/08 15:07:52 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.StructureIdentification
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjector.cs
r77 r131 46 46 AddVariableInfo(new VariableInfo("MaxTreeSize", "MaxTreeSize", typeof(IntData), VariableKind.New)); 47 47 AddVariable(new Variable("MaxTreeSize", new IntData(1))); 48 AddVariableInfo(new VariableInfo("TrainingSamplesStart", "First sample to evaluate in training", typeof(IntData), VariableKind.New));49 AddVariable(new Variable("TrainingSamplesStart", new IntData(0)));50 AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "Last sample to evaluate in training", typeof(IntData), VariableKind.New));51 AddVariable(new Variable("TrainingSamplesEnd", new IntData(0)));52 48 } 53 49 … … 62 58 scope.AddVariable(new Variable(scope.TranslateName("MaxTreeHeight"), (IItem)GetVariable("MaxTreeHeight").Value.Clone())); 63 59 scope.AddVariable(new Variable(scope.TranslateName("MaxTreeSize"), (IItem)GetVariable("MaxTreeSize").Value.Clone())); 64 scope.AddVariable(new Variable(scope.TranslateName("TrainingSamplesStart"), (IItem)GetVariable("TrainingSamplesStart").Value.Clone()));65 scope.AddVariable(new Variable(scope.TranslateName("TrainingSamplesEnd"), (IItem)GetVariable("TrainingSamplesEnd").Value.Clone()));66 60 return null; 67 61 } -
trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjectorView.cs
r2 r131 88 88 if (success) { 89 89 Dataset dataset = (Dataset)StructIdProblemInjector.GetVariable("Dataset").Value; 90 dataset.Rows = parser. Rows;90 dataset.Rows = parser.TrainingSamplesEnd - parser.TrainingSamplesStart; 91 91 dataset.Columns = parser.Columns; 92 92 dataset.VariableNames = parser.VariableNames; 93 93 dataset.Name = parser.ProblemName; 94 dataset.Samples = parser.Samples; 94 dataset.Samples = new double[dataset.Rows * dataset.Columns]; 95 Array.Copy(parser.Samples, dataset.Samples, dataset.Columns * dataset.Rows); 95 96 96 97 ((IntData)StructIdProblemInjector.GetVariable("TargetVariable").Value).Data = parser.TargetVariable; 97 98 ((IntData)StructIdProblemInjector.GetVariable("MaxTreeHeight").Value).Data = parser.MaxTreeHeight; 98 99 ((IntData)StructIdProblemInjector.GetVariable("MaxTreeSize").Value).Data = parser.MaxTreeSize; 99 ((IntData)StructIdProblemInjector.GetVariable("TrainingSamplesStart").Value).Data = parser.TrainingSamplesStart;100 ((IntData)StructIdProblemInjector.GetVariable("TrainingSamplesEnd").Value).Data = parser.TrainingSamplesEnd;101 100 Refresh(); 102 101 }
Note: See TracChangeset
for help on using the changeset viewer.