Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GBM/GradientBoostingRegressionAlgorithm.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GBM/GradientBoostingRegressionAlgorithm.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GBM/GradientBoostingRegressionAlgorithm.cs	(revision 14518)
@@ -44,5 +44,5 @@
   [StorableClass]
   [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 350)]
-  public class GradientBoostingRegressionAlgorithm : BasicAlgorithm {
+  public class GradientBoostingRegressionAlgorithm : BasicAlgorithm, IDataAnalysisAlgorithm<IRegressionProblem> {
     public override Type ProblemType {
       get { return typeof(IRegressionProblem); }
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegression.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegression.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/GaussianProcessRegression.cs	(revision 14518)
@@ -39,5 +39,5 @@
   [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 160)]
   [StorableClass]
-  public sealed class GaussianProcessRegression : GaussianProcessBase, IStorableContent {
+  public sealed class GaussianProcessRegression : GaussianProcessBase, IStorableContent, IDataAnalysisAlgorithm<IRegressionProblem> {
     public string Filename { get; set; }
 
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 14518)
@@ -38,9 +38,11 @@
   [StorableClass]
   [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 125)]
-  public class GradientBoostedTreesAlgorithm : BasicAlgorithm {
-    public override Type ProblemType {
+  public class GradientBoostedTreesAlgorithm : BasicAlgorithm, IDataAnalysisAlgorithm<IRegressionProblem> {
+    public override Type ProblemType
+    {
       get { return typeof(IRegressionProblem); }
     }
-    public new IRegressionProblem Problem {
+    public new IRegressionProblem Problem
+    {
       get { return (IRegressionProblem)base.Problem; }
       set { base.Problem = value; }
@@ -61,32 +63,42 @@
 
     #region ParameterProperties
-    public IFixedValueParameter<IntValue> IterationsParameter {
+    public IFixedValueParameter<IntValue> IterationsParameter
+    {
       get { return (IFixedValueParameter<IntValue>)Parameters[IterationsParameterName]; }
     }
-    public IFixedValueParameter<IntValue> MaxSizeParameter {
+    public IFixedValueParameter<IntValue> MaxSizeParameter
+    {
       get { return (IFixedValueParameter<IntValue>)Parameters[MaxSizeParameterName]; }
     }
-    public IFixedValueParameter<DoubleValue> NuParameter {
+    public IFixedValueParameter<DoubleValue> NuParameter
+    {
       get { return (IFixedValueParameter<DoubleValue>)Parameters[NuParameterName]; }
     }
-    public IFixedValueParameter<DoubleValue> RParameter {
+    public IFixedValueParameter<DoubleValue> RParameter
+    {
       get { return (IFixedValueParameter<DoubleValue>)Parameters[RParameterName]; }
     }
-    public IFixedValueParameter<DoubleValue> MParameter {
+    public IFixedValueParameter<DoubleValue> MParameter
+    {
       get { return (IFixedValueParameter<DoubleValue>)Parameters[MParameterName]; }
     }
-    public IFixedValueParameter<IntValue> SeedParameter {
+    public IFixedValueParameter<IntValue> SeedParameter
+    {
       get { return (IFixedValueParameter<IntValue>)Parameters[SeedParameterName]; }
     }
-    public FixedValueParameter<BoolValue> SetSeedRandomlyParameter {
+    public FixedValueParameter<BoolValue> SetSeedRandomlyParameter
+    {
       get { return (FixedValueParameter<BoolValue>)Parameters[SetSeedRandomlyParameterName]; }
     }
-    public IConstrainedValueParameter<ILossFunction> LossFunctionParameter {
+    public IConstrainedValueParameter<ILossFunction> LossFunctionParameter
+    {
       get { return (IConstrainedValueParameter<ILossFunction>)Parameters[LossFunctionParameterName]; }
     }
-    public IFixedValueParameter<IntValue> UpdateIntervalParameter {
+    public IFixedValueParameter<IntValue> UpdateIntervalParameter
+    {
       get { return (IFixedValueParameter<IntValue>)Parameters[UpdateIntervalParameterName]; }
     }
-    public IFixedValueParameter<BoolValue> CreateSolutionParameter {
+    public IFixedValueParameter<BoolValue> CreateSolutionParameter
+    {
       get { return (IFixedValueParameter<BoolValue>)Parameters[CreateSolutionParameterName]; }
     }
@@ -94,33 +106,41 @@
 
     #region Properties
-    public int Iterations {
+    public int Iterations
+    {
       get { return IterationsParameter.Value.Value; }
       set { IterationsParameter.Value.Value = value; }
     }
-    public int Seed {
+    public int Seed
+    {
       get { return SeedParameter.Value.Value; }
       set { SeedParameter.Value.Value = value; }
     }
-    public bool SetSeedRandomly {
+    public bool SetSeedRandomly
+    {
       get { return SetSeedRandomlyParameter.Value.Value; }
       set { SetSeedRandomlyParameter.Value.Value = value; }
     }
-    public int MaxSize {
+    public int MaxSize
+    {
       get { return MaxSizeParameter.Value.Value; }
       set { MaxSizeParameter.Value.Value = value; }
     }
-    public double Nu {
+    public double Nu
+    {
       get { return NuParameter.Value.Value; }
       set { NuParameter.Value.Value = value; }
     }
-    public double R {
+    public double R
+    {
       get { return RParameter.Value.Value; }
       set { RParameter.Value.Value = value; }
     }
-    public double M {
+    public double M
+    {
       get { return MParameter.Value.Value; }
       set { MParameter.Value.Value = value; }
     }
-    public bool CreateSolution {
+    public bool CreateSolution
+    {
       get { return CreateSolutionParameter.Value.Value; }
       set { CreateSolutionParameter.Value.Value = value; }
@@ -129,9 +149,11 @@
 
     #region ResultsProperties
-    private double ResultsBestQuality {
+    private double ResultsBestQuality
+    {
       get { return ((DoubleValue)Results["Best Quality"].Value).Value; }
       set { ((DoubleValue)Results["Best Quality"].Value).Value = value; }
     }
-    private DataTable ResultsQualities {
+    private DataTable ResultsQualities
+    {
       get { return ((DataTable)Results["Qualities"].Value); }
     }
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj	(revision 14518)
@@ -338,19 +338,4 @@
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="KPCA\SelfOrganizingMap.cs" />
-    <Compile Include="KPCA\KernelFunctions\CicularKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\GaussianKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\InverseMultiquadraticKernel .cs" />
-    <Compile Include="KPCA\KernelFunctions\LaplacianKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\MultiquadraticKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\NoKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\PolysplineKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\RadialBasisKernelBase.cs" />
-    <Compile Include="KPCA\KernelFunctions\ThinPlatePolysplineKernel.cs" />
-    <Compile Include="KPCA\KernelFunctions\TricubicKernel.cs" />
-    <Compile Include="KPCA\KernelPrincipleComponentAnalysis.cs" />
-    <Compile Include="KPCA\Isomap.cs" />
-    <Compile Include="KPCA\KPCA.cs" />
-    <Compile Include="KPCA\MatrixUtilities.cs" />
     <Compile Include="Linear\AlglibUtil.cs" />
     <Compile Include="Linear\Scaling.cs" />
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Cell.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Cell.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Cell.cs	(revision 14518)
@@ -57,10 +57,9 @@
 using System.Linq;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
   [StorableClass]
-  public class Cell : Item, ICell {
+  public class Cell : DeepCloneable, ICell {
     #region properties
     [Storable]
@@ -74,5 +73,5 @@
     #region HLConstructors & Cloning
     [StorableConstructor]
-    protected Cell(bool deserializing) : base(deserializing) { }
+    protected Cell(bool deserializing) { }
     protected Cell(Cell original, Cloner cloner) : base(original, cloner) {
       dimension = original.dimension;
@@ -112,6 +111,4 @@
       return true;
     }
-
-
   }
 }
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/DataPoint.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/DataPoint.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/DataPoint.cs	(revision 14518)
@@ -55,10 +55,9 @@
 
 using HeuristicLab.Common;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
   [StorableClass]
-  public class DataPoint<T> : Item, IDataPoint<T> where T : class, IDeepCloneable {
+  public class DataPoint<T> : DeepCloneable, IDataPoint<T> where T : class, IDeepCloneable {
     #region properties
     [Storable]
@@ -75,5 +74,5 @@
     #region HLConstructors & Cloning
     [StorableConstructor]
-    protected DataPoint(bool deserializing) : base(deserializing) { }
+    protected DataPoint(bool deserializing) { }
     protected DataPoint(DataPoint<T> original, Cloner cloner)
       : base(original, cloner) {
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/SPtree.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/SPtree.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/SPtree.cs	(revision 14518)
@@ -58,10 +58,9 @@
 using System.Linq;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
   [StorableClass]
-  public class SPTree : Item, ISPTree {
+  public class SPTree : DeepCloneable, ISPTree {
     private const uint QT_NODE_CAPACITY = 1;
 
@@ -100,5 +99,5 @@
     #region HLConstructors & Cloning
     [StorableConstructor]
-    protected SPTree(bool deserializing) : base(deserializing) { }
+    protected SPTree(bool deserializing) { }
     protected SPTree(SPTree original, Cloner cloner)
       : base(original, cloner) {
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNE.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNE.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNE.cs	(revision 14518)
@@ -67,5 +67,5 @@
 namespace HeuristicLab.Algorithms.DataAnalysis {
   [StorableClass]
-  public class TSNE<T> : Item, ITSNE<T> where T : class, IDeepCloneable {
+  public class TSNE<T> : DeepCloneable, ITSNE<T> where T : class, IDeepCloneable {
 
     private const string IterationResultName = "Iteration";
@@ -106,5 +106,5 @@
     #region HLConstructors & Cloning
     [StorableConstructor]
-    protected TSNE(bool deserializing) : base(deserializing) { }
+    protected TSNE(bool deserializing) { }
     protected TSNE(TSNE<T> original, Cloner cloner) : base(original, cloner) {
       distance = cloner.Clone(original.distance);
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEAnalysis.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEAnalysis.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEAnalysis.cs	(revision 14518)
@@ -20,7 +20,9 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Drawing;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Analysis;
 using HeuristicLab.Common;
@@ -28,4 +30,5 @@
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -40,6 +43,15 @@
   [Creatable(CreatableAttribute.Categories.DataAnalysis, Priority = 100)]
   [StorableClass]
-  public sealed class TSNEAnalysis : FixedDataAnalysisAlgorithm<IRegressionProblem> {
-
+  public sealed class TSNEAnalysis : BasicAlgorithm {
+
+    public override Type ProblemType
+    {
+      get { return typeof(IDataAnalysisProblem); }
+    }
+    public new IDataAnalysisProblem Problem
+    {
+      get { return (IDataAnalysisProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
     #region Resultnames
     private const string ScatterPlotResultName = "Scatterplot";
@@ -61,4 +73,5 @@
     private const string SeedParameterName = "Seed";
     private const string ClassesParameterName = "ClassNames";
+    private const string NormalizationParameterName = "Normalization";
     #endregion
 
@@ -115,4 +128,8 @@
     {
       get { return Parameters[ClassesParameterName] as IFixedValueParameter<StringValue>; }
+    }
+    public IFixedValueParameter<BoolValue> NormalizationParameter
+    {
+      get { return Parameters[NormalizationParameterName] as IFixedValueParameter<BoolValue>; }
     }
     #endregion
@@ -174,5 +191,8 @@
       get { return ClassesParameter.Value.Value; }
     }
-
+    public bool Normalization
+    {
+      get { return NormalizationParameter.Value.Value; }
+    }
     [Storable]
     public TSNE<RealVector> tsne;
@@ -191,6 +211,6 @@
       Parameters.Add(new FixedValueParameter<IntValue>(NewDimensionsParameterName, "Dimensionality of projected space (usually 2 for easy visual analysis", new IntValue(2)));
       Parameters.Add(new FixedValueParameter<IntValue>(MaxIterationsParameterName, "Maximum number of iterations for gradient descent", new IntValue(1000)));
-      Parameters.Add(new FixedValueParameter<IntValue>(StopLyingIterationParameterName, "Number of iterations after which p is no longer approximated", new IntValue(250)));
-      Parameters.Add(new FixedValueParameter<IntValue>(MomentumSwitchIterationParameterName, "Number of iterations after which the momentum in the gradient descent is switched", new IntValue(250)));
+      Parameters.Add(new FixedValueParameter<IntValue>(StopLyingIterationParameterName, "Number of iterations after which p is no longer approximated", new IntValue(0)));
+      Parameters.Add(new FixedValueParameter<IntValue>(MomentumSwitchIterationParameterName, "Number of iterations after which the momentum in the gradient descent is switched", new IntValue(0)));
       Parameters.Add(new FixedValueParameter<DoubleValue>(InitialMomentumParameterName, "The initial momentum in the gradient descent", new DoubleValue(0.5)));
       Parameters.Add(new FixedValueParameter<DoubleValue>(FinalMomentumParameterName, "The final momentum", new DoubleValue(0.8)));
@@ -199,11 +219,13 @@
       Parameters.Add(new FixedValueParameter<IntValue>(SeedParameterName, "The seed used if it should not be random", new IntValue(0)));
       Parameters.Add(new FixedValueParameter<StringValue>(ClassesParameterName, "name of the column specifying the class lables of each data point. \n if the lable column can not be found Training/Test is used as labels", new StringValue("none")));
-    }
-    #endregion
-
-    protected override void Run() {
-      var data = CalculateProjectedData(Problem.ProblemData);
-      var lowDimData = new DoubleMatrix(data);
-    }
+      Parameters.Add(new FixedValueParameter<BoolValue>(NormalizationParameterName, "Wether the data should be zero centered and have variance of 1 for each variable, so different scalings are ignored", new BoolValue(true)));
+
+      MomentumSwitchIterationParameter.Hidden = true;
+      InitialMomentumParameter.Hidden = true;
+      FinalMomentumParameter.Hidden = true;
+      StopLyingIterationParameter.Hidden = true;
+      EtaParameter.Hidden = true;
+    }
+    #endregion
 
     public override void Stop() {
@@ -212,6 +234,11 @@
     }
 
+    protected override void Run(CancellationToken cancellationToken) {
+      var data = CalculateProjectedData(Problem.ProblemData);
+      var lowDimData = new DoubleMatrix(data);
+    }
+
     private double[,] CalculateProjectedData(IDataAnalysisProblemData problemData) {
-      var DataRowNames = new Dictionary<string, List<int>>();
+      var dataRowNames = new Dictionary<string, List<int>>();
       var rows = new Dictionary<string, ScatterPlotDataRow>();
 
@@ -220,6 +247,6 @@
           var classes = problemData.Dataset.GetStringValues(Classes).ToArray();
           for (int i = 0; i < classes.Length; i++) {
-            if (!DataRowNames.ContainsKey(classes[i])) DataRowNames.Add(classes[i], new List<int>());
-            DataRowNames[classes[i]].Add(i); //always succeeds
+            if (!dataRowNames.ContainsKey(classes[i])) dataRowNames.Add(classes[i], new List<int>());
+            dataRowNames[classes[i]].Add(i); //always succeeds
           }
         } else if ((problemData.Dataset as Dataset).VariableHasType<double>(Classes)) {
@@ -228,30 +255,55 @@
           var min = classValues.Min() - 0.1;
           var contours = 8;
-          for (int i = 0; i < contours; i++) {
+          for (var i = 0; i < contours; i++) {
             var name = GetContourName(i, min, max, contours);
-            DataRowNames.Add(name, new List<int>());
+            dataRowNames.Add(name, new List<int>());
             rows.Add(name, new ScatterPlotDataRow(name, "", new List<Point2D<double>>()));
             rows[name].VisualProperties.Color = GetHeatMapColor(i, contours);
-            rows[name].VisualProperties.PointSize = i+3;
+            rows[name].VisualProperties.PointSize = i + 3;
           }
           for (int i = 0; i < classValues.Length; i++) {
-            DataRowNames[GetContourName(classValues[i], min, max, contours)].Add(i); //always succeeds
+            dataRowNames[GetContourName(classValues[i], min, max, contours)].Add(i); //always succeeds
           }
 
         }
 
-
       } else {
-        DataRowNames.Add("Training", problemData.TrainingIndices.ToList());
-        DataRowNames.Add("Test", problemData.TestIndices.ToList());
+        dataRowNames.Add("Training", problemData.TrainingIndices.ToList());
+        dataRowNames.Add("Test", problemData.TestIndices.ToList());
       }
 
       var random = SetSeedRandomly ? new MersenneTwister() : new MersenneTwister(Seed);
-      tsne = new TSNE<RealVector>(Distance, random, Results, MaxIterations, StopLyingIteration, MomentumSwitchIteration, InitialMomentum, FinalMomentum, Eta, DataRowNames, rows);
+      tsne = new TSNE<RealVector>(Distance, random, Results, MaxIterations, StopLyingIteration, MomentumSwitchIteration, InitialMomentum, FinalMomentum, Eta, dataRowNames, rows);
       var dataset = problemData.Dataset;
       var allowedInputVariables = problemData.AllowedInputVariables.ToArray();
       var data = new RealVector[dataset.Rows];
       for (var row = 0; row < dataset.Rows; row++) data[row] = new RealVector(allowedInputVariables.Select(col => dataset.GetDoubleValue(col, row)).ToArray());
+
+      if (Normalization) {
+        data = NormalizeData(data);
+      }
+
       return tsne.Run(data, NewDimensions, Perplexity, Theta);
+    }
+
+    private RealVector[] NormalizeData(RealVector[] data) {
+      var n = data[0].Length;
+      var mean = new double[n];
+      var sd = new double[n];
+      var nData = new RealVector[data.Length];
+      for (var i = 0; i < n; i++) {
+        var i1 = i;
+        sd[i] = Enumerable.Range(0, data.Length).Select(x => data[x][i1]).StandardDeviation();
+        mean[i] = Enumerable.Range(0, data.Length).Select(x => data[x][i1]).Average();
+      }
+      for (int i = 0; i < data.Length; i++) {
+        nData[i] = new RealVector(n);
+        for (int j = 0; j < n; j++) {
+          nData[i][j] = (data[i][j] - mean[j]) / sd[j];
+        }
+      }
+      return nData;
+
+
     }
 
Index: branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/VPTree.cs
===================================================================
--- branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/VPTree.cs	(revision 14515)
+++ branches/TSNE/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/VPTree.cs	(revision 14518)
@@ -64,5 +64,5 @@
 namespace HeuristicLab.Algorithms.DataAnalysis {
   [StorableClass]
-  public class VPTree<T> : Item, IVPTree<T> where T : class, IDeepCloneable {
+  public class VPTree<T> : DeepCloneable, IVPTree<T> where T : class, IDeepCloneable {
     #region properties
     [Storable]
@@ -78,5 +78,5 @@
     #region HLConstructors & Cloning
     [StorableConstructor]
-    protected VPTree(bool deserializing) : base(deserializing) { }
+    protected VPTree(bool deserializing) { }
     protected VPTree(VPTree<T> original, Cloner cloner)
       : base(original, cloner) {
