Changeset 7213 for branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
- Timestamp:
- 12/20/11 11:45:18 (12 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r6636 r7213 224 224 } 225 225 } 226 public static new Image StaticItemImage { 227 get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; } 228 } 226 229 public override Image ItemImage { 227 230 get { … … 230 233 else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused; 231 234 else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped; 232 else return HeuristicLab.Common.Resources.VSImageLibrary.Event;235 else return base.ItemImage; 233 236 } 234 237 } … … 278 281 int testEnd = (i + 1) == Folds.Value ? SamplesEnd.Value : (i + 1) * testSamplesCount + SamplesStart.Value; 279 282 283 problem.ProblemData.TrainingPartition.Start = SamplesStart.Value; 284 problem.ProblemData.TrainingPartition.End = SamplesEnd.Value; 280 285 problem.ProblemData.TestPartition.Start = testStart; 281 286 problem.ProblemData.TestPartition.End = testEnd; … … 515 520 throw new InvalidOperationException("Can not change number of folds if the execution state is not prepared."); 516 521 } 522 523 private bool samplesChanged = false; 517 524 private void SamplesStart_ValueChanged(object sender, EventArgs e) { 525 samplesChanged = true; 518 526 if (Problem != null) Problem.ProblemData.TrainingPartition.Start = SamplesStart.Value; 527 samplesChanged = false; 519 528 } 520 529 private void SamplesEnd_ValueChanged(object sender, EventArgs e) { 530 samplesChanged = true; 521 531 if (Problem != null) Problem.ProblemData.TrainingPartition.End = SamplesEnd.Value; 532 samplesChanged = false; 522 533 } 523 534 … … 543 554 throw new ArgumentException("A cross validation algorithm can only contain DataAnalysisProblems."); 544 555 } 545 algorithm.Problem.Reset += (x, y) => OnProblemChanged();556 algorithm.Problem.Reset += (x, y) => OnProblemChanged(); 546 557 problem = (IDataAnalysisProblem)algorithm.Problem; 547 558 OnProblemChanged(); … … 551 562 EventHandler handler = ProblemChanged; 552 563 if (handler != null) handler(this, EventArgs.Empty); 564 if (samplesChanged) return; 553 565 554 566 SamplesStart.Value = 0;
Note: See TracChangeset
for help on using the changeset viewer.