Index: /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IRandomForestModel.cs
===================================================================
--- /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IRandomForestModel.cs	(revision 14821)
+++ /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IRandomForestModel.cs	(revision 14822)
@@ -29,5 +29,5 @@
   /// Interface to represent a random forest model for either regression or classification
   /// </summary>
-  public interface IRandomForestModel : IRegressionModel, IClassificationModel {
+  public interface IRandomForestModel : IConfidenceRegressionModel, IClassificationModel {
   }
 }
Index: /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IRandomForestRegressionSolution.cs
===================================================================
--- /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IRandomForestRegressionSolution.cs	(revision 14821)
+++ /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/IRandomForestRegressionSolution.cs	(revision 14822)
@@ -28,5 +28,5 @@
   /// Interface to represent a random forest regression solution
   /// </summary>
-  public interface IRandomForestRegressionSolution : IRegressionSolution {
+  public interface IRandomForestRegressionSolution : IConfidenceRegressionSolution {
     new IRandomForestModel Model { get; }
   }
Index: /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
===================================================================
--- /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs	(revision 14821)
+++ /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs	(revision 14822)
@@ -152,4 +152,22 @@
     }
 
+    public IEnumerable<double> GetEstimatedVariances(IDataset dataset, IEnumerable<int> rows) {
+      double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, AllowedInputVariables, rows);
+      AssertInputMatrix(inputData);
+
+      int n = inputData.GetLength(0);
+      int columns = inputData.GetLength(1);
+      double[] x = new double[columns];
+      double[] ys = new double[this.RandomForest.innerobj.ntrees];
+
+      for (int row = 0; row < n; row++) {
+        for (int column = 0; column < columns; column++) {
+          x[column] = inputData[row, column];
+        }
+        alglib.dforest.dfprocessraw(RandomForest.innerobj, x, ref ys);
+        yield return ys.VariancePop();
+      }
+    }
+
     public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
       double[,] inputData = AlglibUtil.PrepareInputMatrix(dataset, AllowedInputVariables, rows);
Index: /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegressionSolution.cs
===================================================================
--- /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegressionSolution.cs	(revision 14821)
+++ /stable/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegressionSolution.cs	(revision 14822)
@@ -31,5 +31,5 @@
   [Item("RandomForestRegressionSolution", "Represents a random forest solution for a regression problem which can be visualized in the GUI.")]
   [StorableClass]
-  public sealed class RandomForestRegressionSolution : RegressionSolution, IRandomForestRegressionSolution {
+  public sealed class RandomForestRegressionSolution : ConfidenceRegressionSolution, IRandomForestRegressionSolution {
 
     public new IRandomForestModel Model {
Index: /stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/ALGLIB-3.7.0/dataanalysis.cs
===================================================================
--- /stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/ALGLIB-3.7.0/dataanalysis.cs	(revision 14821)
+++ /stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/ALGLIB-3.7.0/dataanalysis.cs	(revision 14822)
@@ -10046,16 +10046,68 @@
 
 
+        // HEAL pfleck
+        /*************************************************************************
+        Procesing
+
+        INPUT PARAMETERS:
+            DF      -   decision forest model
+            X       -   input vector,  array[0..NVars-1].
+
+        OUTPUT PARAMETERS:
+            ys      -   result. Regression estimates for each tree when solving regression task.
+
+          -- HeuristicLab --
+              Copyright 18.07.2016 by HEAL, based on implementation of dfprocess by Bochkanov Sergey
+        *************************************************************************/
+        public static void dfprocessraw(decisionforest df,
+            double[] x,
+            ref double[] ys) 
+        {
+            int offs = 0;
+            int i = 0;
+            var y = new double[1];
+
+            if (df.nclasses != 1)
+                return;
+
+            //
+            // Proceed
+            //
+            if (alglib.ap.len(ys)<df.ntrees) 
+            {
+                ys = new double[df.ntrees];
+            }
+            offs = 0;
+            for (i=0; i<=df.ntrees-1; i++) {
+
+                //
+                // Process basic tree
+                //
+                y[0] = 0;
+                dfprocessinternal(df, offs, x, ref y);
+                ys[i] = y[0];
+                
+
+                //
+                // Next tree
+                //
+                offs = offs+(int)Math.Round(df.trees[offs]);
+            }
+        }
+
+
+
         /*************************************************************************
         Relative classification error on the test set
-
+        
         INPUT PARAMETERS:
             DF      -   decision forest model
             XY      -   test set
             NPoints -   test set size
-
+        
         RESULT:
             percent of incorrectly classified cases.
             Zero if model solves regression task.
-
+        
           -- ALGLIB --
              Copyright 16.02.2009 by Bochkanov Sergey
Index: /stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/HeuristicLab.ALGLIB-3.7.0/ALGLIB changes by HEAL.txt
===================================================================
--- /stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/HeuristicLab.ALGLIB-3.7.0/ALGLIB changes by HEAL.txt	(revision 14822)
+++ /stable/HeuristicLab.ExtLibs/HeuristicLab.ALGLIB/3.7.0/HeuristicLab.ALGLIB-3.7.0/ALGLIB changes by HEAL.txt	(revision 14822)
@@ -0,0 +1,7 @@
+ALGLIB changes by HEAL
+
+ap.cs(ln 573)
+mkommend: added thread static attribute to RNG to have a separate instance per thread and allow modification of the seed
+
+dataanalysis.cs(ln 10048)
+pfleck: added "raw" version of dfprocess that returns the regression estimate for each tree
