Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs	(revision 7120)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs	(revision 7213)
@@ -224,4 +224,7 @@
       }
     }
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
+    }
     public override Image ItemImage {
       get {
@@ -230,5 +233,5 @@
         else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused;
         else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;
-        else return HeuristicLab.Common.Resources.VSImageLibrary.Event;
+        else return base.ItemImage;
       }
     }
@@ -278,4 +281,6 @@
             int testEnd = (i + 1) == Folds.Value ? SamplesEnd.Value : (i + 1) * testSamplesCount + SamplesStart.Value;
 
+            problem.ProblemData.TrainingPartition.Start = SamplesStart.Value;
+            problem.ProblemData.TrainingPartition.End = SamplesEnd.Value;
             problem.ProblemData.TestPartition.Start = testStart;
             problem.ProblemData.TestPartition.End = testEnd;
@@ -515,9 +520,15 @@
         throw new InvalidOperationException("Can not change number of folds if the execution state is not prepared.");
     }
+
+    private bool samplesChanged = false;
     private void SamplesStart_ValueChanged(object sender, EventArgs e) {
+      samplesChanged = true;
       if (Problem != null) Problem.ProblemData.TrainingPartition.Start = SamplesStart.Value;
+      samplesChanged = false;
     }
     private void SamplesEnd_ValueChanged(object sender, EventArgs e) {
+      samplesChanged = true;
       if (Problem != null) Problem.ProblemData.TrainingPartition.End = SamplesEnd.Value;
+      samplesChanged = false;
     }
 
@@ -543,5 +554,5 @@
         throw new ArgumentException("A cross validation algorithm can only contain DataAnalysisProblems.");
       }
-      algorithm.Problem.Reset += (x,y) => OnProblemChanged();
+      algorithm.Problem.Reset += (x, y) => OnProblemChanged();
       problem = (IDataAnalysisProblem)algorithm.Problem;
       OnProblemChanged();
@@ -551,4 +562,5 @@
       EventHandler handler = ProblemChanged;
       if (handler != null) handler(this, EventArgs.Empty);
+      if (samplesChanged) return;
 
       SamplesStart.Value = 0;
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassificationSolution.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassificationSolution.cs	(revision 7120)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassificationSolution.cs	(revision 7213)
@@ -51,5 +51,4 @@
       return new NeuralNetworkClassificationSolution(this, cloner);
     }
-
     protected override void RecalculateResults() {
       CalculateResults();
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs	(revision 7120)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs	(revision 7213)
@@ -98,7 +98,4 @@
       this.targetVariable = original.targetVariable;
       this.allowedInputVariables = (string[])original.allowedInputVariables.Clone();
-      foreach (var dataset in original.cachedPredictions.Keys) {
-        this.cachedPredictions.Add(cloner.Clone(dataset), (double[])original.cachedPredictions[dataset].Clone());
-      }
       if (original.classValues != null)
         this.classValues = (double[])original.classValues.Clone();
@@ -162,43 +159,11 @@
     }
     #endregion
-    // cache for predictions, which is cloned but not persisted, must be cleared when the model is changed
-    private Dictionary<Dataset, double[]> cachedPredictions = new Dictionary<Dataset, double[]>();
     private IEnumerable<double> GetEstimatedValuesHelper(Dataset dataset, IEnumerable<int> rows) {
-      if (!cachedPredictions.ContainsKey(dataset)) {
-        // create an array of cached predictions which is initially filled with NaNs
-        double[] predictions = Enumerable.Repeat(double.NaN, dataset.Rows).ToArray();
-        CalculatePredictions(dataset, rows, predictions);
-        cachedPredictions.Add(dataset, predictions);
-      }
-      // get the array of predictions and select the subset of requested rows
-      double[] p = cachedPredictions[dataset];
-      var requestedPredictions = from r in rows
-                                 select p[r];
-      // check if the requested predictions contain NaNs 
-      // (this means for the request rows some predictions have not been cached)
-      if (requestedPredictions.Any(x => double.IsNaN(x))) {
-        // updated the predictions for currently requested rows
-        CalculatePredictions(dataset, rows, p);
-        cachedPredictions[dataset] = p;
-        // now we can be sure that for the current rows all predictions are available
-        return from r in rows
-               select p[r];
-      } else {
-        // there were no NaNs => just return the cached predictions
-        return requestedPredictions;
-      }
-    }
-
-    private void CalculatePredictions(Dataset dataset, IEnumerable<int> rows, double[] predictions) {
-      // calculate and cache predictions for the currently requested rows
+      // calculate predictions for the currently requested rows
       SVM.Problem problem = SupportVectorMachineUtil.CreateSvmProblem(dataset, targetVariable, allowedInputVariables, rows);
       SVM.Problem scaledProblem = Scaling.Scale(RangeTransform, problem);
 
-      // row is the index in the original dataset, 
-      // i is the index in the scaled dataset (containing only the necessary rows)
-      int i = 0;
-      foreach (var row in rows) {
-        predictions[row] = SVM.Prediction.Predict(Model, scaledProblem.X[i]);
-        i++;
+      for (int i = 0; i < scaledProblem.Count; i++) {
+        yield return SVM.Prediction.Predict(Model, scaledProblem.X[i]);
       }
     }
@@ -207,5 +172,4 @@
     public event EventHandler Changed;
     private void OnChanged(EventArgs e) {
-      cachedPredictions.Clear();
       var handlers = Changed;
       if (handlers != null)
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringModel.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringModel.cs	(revision 7120)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringModel.cs	(revision 7213)
@@ -20,15 +20,11 @@
 #endregion
 
-using System;
 using System.Collections.Generic;
-using System.IO;
+using System.Drawing;
 using System.Linq;
-using System.Text;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using SVM;
 using HeuristicLab.Problems.DataAnalysis;
-using System.Drawing;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
@@ -39,5 +35,5 @@
   [Item("KMeansClusteringModel", "Represents a k-Means clustering model.")]
   public sealed class KMeansClusteringModel : NamedItem, IClusteringModel {
-    public override Image ItemImage {
+    public static new Image StaticItemImage {
       get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; }
     }
