Changeset 16972
- Timestamp:
- 05/21/19 09:57:53 (6 years ago)
- Location:
- branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Problem.cs
r16954 r16972 862 862 var absValues = solutionDataset.GetDoubleValues(name).ToArray(); 863 863 864 solutionDataset.AddVariable(name + "_diff", CalculateDifferences(absValues, NumericDifferencesSmoothing).ToList()); 864 var diffValues = new double[absValues.Length]; 865 foreach(var ep in TrainingEpisodes) { 866 var y = solutionDataset.GetDoubleValues(name, Enumerable.Range(ep.Start, ep.End - ep.Start)).ToArray(); 867 var yd = CalculateDifferences(y, NumericDifferencesSmoothing).ToArray(); 868 for(int r = ep.Start; r < ep.End;r++) { 869 diffValues[r] = yd[r - ep.Start]; 870 } 871 } 872 873 solutionDataset.AddVariable(name + "_diff", diffValues); 865 874 var solutionProblemData = new RegressionProblemData(solutionDataset, problemData.AllowedInputVariables, name + "_diff"); 866 solutionProblemData.TrainingPartition.Start = problemData.TrainingPartition.Start;867 solutionProblemData.TrainingPartition.End = problemData.TrainingPartition.End;875 solutionProblemData.TrainingPartition.Start = TrainingEpisodes.Select(ep => ep.Start).Min(); 876 solutionProblemData.TrainingPartition.End = TrainingEpisodes.Select(ep => ep.End).Max(); // assumes training episodes are sequential without gaps 868 877 solutionProblemData.TestPartition.Start = problemData.TestPartition.Start; 869 878 solutionProblemData.TestPartition.End = problemData.TestPartition.End; -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/ProblemInstanceProvider.cs
r16954 r16972 117 117 private DataDescriptor Glider() { 118 118 return new DataDescriptor { 119 Name = " Bar Magnets",119 Name = "Glider", 120 120 Description = "Publication: M. Schmidt, H. Lipson; Data-Mining Dynamical Systems: Automated Symbolic System Identification for Exploratory Analysis, ESDA 2008.", 121 121 TargetVariables = new[] { "y1", "y2" }, … … 169 169 TargetVariables = new[] { "y1", "y2", "y3", "y4", "y5" }, 170 170 InputVariables = new string[] { }, 171 TrainingEpisodes = new IntRange[] { new IntRange(0, 3 0), new IntRange(31, 61), new IntRange(62, 92) },171 TrainingEpisodes = new IntRange[] { new IntRange(0, 31), new IntRange(31, 62), new IntRange(62, 93) }, 172 172 TestEpisodes = new IntRange[] { }, 173 173 FileName = "S-System.csv"
Note: See TracChangeset
for help on using the changeset viewer.