Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj	(revision 7270)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj	(revision 7669)
@@ -101,6 +101,6 @@
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="ALGLIB-3.1.0, Version=3.1.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <HintPath>..\..\bin\ALGLIB-3.1.0.dll</HintPath>
+    <Reference Include="ALGLIB-3.4.0, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <HintPath>..\..\bin\ALGLIB-3.4.0.dll</HintPath>
       <Private>False</Private>
     </Reference>
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 7270)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 7669)
@@ -112,4 +112,5 @@
       SymbolicRegressionSolution solution = new SymbolicRegressionSolution(new SymbolicRegressionModel(tree, new SymbolicDataAnalysisExpressionTreeInterpreter()), (IRegressionProblemData)problemData.Clone());
       solution.Model.Name = "Linear Regression Model";
+      solution.Name = "Linear Regression Solution";
       return solution;
     }
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs	(revision 7270)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs	(revision 7669)
@@ -73,5 +73,4 @@
       kdTree.curdist = original.kdTree.curdist;
       kdTree.debugcounter = original.kdTree.debugcounter;
-      kdTree.distmatrixtype = original.kdTree.distmatrixtype;
       kdTree.idx = (int[])original.kdTree.idx.Clone();
       kdTree.kcur = original.kdTree.kcur;
@@ -241,9 +240,4 @@
     }
     [Storable]
-    public int KDTreeDistMatrixType {
-      get { return kdTree.distmatrixtype; }
-      set { kdTree.distmatrixtype = value; }
-    }
-    [Storable]
     public int[] KDTreeIdx {
       get { return kdTree.idx; }
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/Plugin.cs.frame
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/Plugin.cs.frame	(revision 7270)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/Plugin.cs.frame	(revision 7669)
@@ -28,5 +28,5 @@
   [Plugin("HeuristicLab.Algorithms.DataAnalysis", "Provides wrappers for data analysis algorithms implemented in external libraries (linear regression, linear discriminant analysis, k-means clustering, support vector classification and regression)", "3.4.2.$WCREV$")]
   [PluginFile("HeuristicLab.Algorithms.DataAnalysis-3.4.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.ALGLIB", "3.1.0")]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.4.0")]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs	(revision 7270)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs	(revision 7669)
@@ -113,11 +113,19 @@
       IClassificationProblemData problemData = Problem.ProblemData;
       IEnumerable<string> selectedInputVariables = problemData.AllowedInputVariables;
-      var solution = CreateSupportVectorClassificationSolution(problemData, selectedInputVariables, SvmType.Value, KernelType.Value, Cost.Value, Nu.Value, Gamma.Value);
+      double trainingAccuracy, testAccuracy;
+      int nSv;
+      var solution = CreateSupportVectorClassificationSolution(problemData, selectedInputVariables,
+        SvmType.Value, KernelType.Value, Cost.Value, Nu.Value, Gamma.Value,
+        out trainingAccuracy, out testAccuracy, out nSv);
 
       Results.Add(new Result("Support vector classification solution", "The support vector classification solution.", solution));
+      Results.Add(new Result("Training accuracy", "The accuracy of the SVR solution on the training partition.", new DoubleValue(trainingAccuracy)));
+      Results.Add(new Result("Test R²", "The accuracy of the SVR solution on the test partition.", new DoubleValue(testAccuracy)));
+      Results.Add(new Result("Number of support vectors", "The number of support vectors of the SVR solution.", new IntValue(nSv)));
     }
 
     public static SupportVectorClassificationSolution CreateSupportVectorClassificationSolution(IClassificationProblemData problemData, IEnumerable<string> allowedInputVariables,
-      string svmType, string kernelType, double cost, double nu, double gamma) {
+      string svmType, string kernelType, double cost, double nu, double gamma,
+      out double trainingAccuracy, out double testAccuracy, out int nSv) {
       Dataset dataset = problemData.Dataset;
       string targetVariable = problemData.TargetVariable;
@@ -148,7 +156,13 @@
       SVM.RangeTransform rangeTransform = SVM.RangeTransform.Compute(problem);
       SVM.Problem scaledProblem = SVM.Scaling.Scale(rangeTransform, problem);
-      var model = new SupportVectorMachineModel(SVM.Training.Train(scaledProblem, parameter), rangeTransform, targetVariable, allowedInputVariables, problemData.ClassValues);
+      var svmModel = SVM.Training.Train(scaledProblem, parameter);
+      var model = new SupportVectorMachineModel(svmModel, rangeTransform, targetVariable, allowedInputVariables, problemData.ClassValues);
+      var solution = new SupportVectorClassificationSolution(model, (IClassificationProblemData)problemData.Clone());
 
-      return new SupportVectorClassificationSolution(model, (IClassificationProblemData)problemData.Clone());
+      nSv = svmModel.SupportVectorCount;
+      trainingAccuracy = solution.TrainingAccuracy;
+      testAccuracy = solution.TestAccuracy;
+
+      return solution;
     }
     #endregion
Index: branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs
===================================================================
--- branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs	(revision 7270)
+++ branches/HeuristicLab.Hive.Azure/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs	(revision 7669)
@@ -121,11 +121,19 @@
       IRegressionProblemData problemData = Problem.ProblemData;
       IEnumerable<string> selectedInputVariables = problemData.AllowedInputVariables;
-      var solution = CreateSupportVectorRegressionSolution(problemData, selectedInputVariables, SvmType.Value, KernelType.Value, Cost.Value, Nu.Value, Gamma.Value, Epsilon.Value);
+      double trainR2, testR2;
+      int nSv;
+      var solution = CreateSupportVectorRegressionSolution(problemData, selectedInputVariables, SvmType.Value,
+        KernelType.Value, Cost.Value, Nu.Value, Gamma.Value, Epsilon.Value,
+        out trainR2, out testR2, out nSv);
 
       Results.Add(new Result("Support vector regression solution", "The support vector regression solution.", solution));
+      Results.Add(new Result("Training R²", "The Pearson's R² of the SVR solution on the training partition.", new DoubleValue(trainR2)));
+      Results.Add(new Result("Test R²", "The Pearson's R² of the SVR solution on the test partition.", new DoubleValue(testR2)));
+      Results.Add(new Result("Number of support vectors", "The number of support vectors of the SVR solution.", new IntValue(nSv)));
     }
 
     public static SupportVectorRegressionSolution CreateSupportVectorRegressionSolution(IRegressionProblemData problemData, IEnumerable<string> allowedInputVariables,
-      string svmType, string kernelType, double cost, double nu, double gamma, double epsilon) {
+      string svmType, string kernelType, double cost, double nu, double gamma, double epsilon,
+      out double trainingR2, out double testR2, out int nSv) {
       Dataset dataset = problemData.Dataset;
       string targetVariable = problemData.TargetVariable;
@@ -147,6 +155,11 @@
       SVM.RangeTransform rangeTransform = SVM.RangeTransform.Compute(problem);
       SVM.Problem scaledProblem = SVM.Scaling.Scale(rangeTransform, problem);
-      var model = new SupportVectorMachineModel(SVM.Training.Train(scaledProblem, parameter), rangeTransform, targetVariable, allowedInputVariables);
-      return new SupportVectorRegressionSolution(model, (IRegressionProblemData)problemData.Clone());
+      var svmModel = SVM.Training.Train(scaledProblem, parameter);
+      nSv = svmModel.SupportVectorCount;
+      var model = new SupportVectorMachineModel(svmModel, rangeTransform, targetVariable, allowedInputVariables);
+      var solution = new SupportVectorRegressionSolution(model, (IRegressionProblemData)problemData.Clone());
+      trainingR2 = solution.TrainingRSquared;
+      testR2 = solution.TestRSquared;
+      return solution;
     }
     #endregion
