Index: /stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.Designer.cs	(revision 14022)
@@ -19,4 +19,5 @@
  */
 #endregion
+
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -45,4 +46,5 @@
     /// </summary>
     private void InitializeComponent() {
+      this.btnImpactCalculation = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
       this.splitContainer.Panel1.SuspendLayout();
@@ -52,4 +54,22 @@
       this.detailsGroupBox.SuspendLayout();
       this.SuspendLayout();
+      // 
+      // btnImpactCalculation
+      // 
+      this.btnImpactCalculation.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
+      this.btnImpactCalculation.Image = HeuristicLab.Common.Resources.VSImageLibrary.Zoom;
+      this.btnImpactCalculation.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
+      this.btnImpactCalculation.Name = "btnImpactCalculation";
+      this.btnImpactCalculation.TabIndex = 6;
+      this.btnImpactCalculation.Size = new System.Drawing.Size(110, 24);
+      this.btnImpactCalculation.Text = "Variable Impacts";
+      this.btnImpactCalculation.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.btnImpactCalculation.UseVisualStyleBackColor = true;
+      this.btnImpactCalculation.Click += new System.EventHandler(this.btnImpactCalculation_Click);
+      this.toolTip.SetToolTip(this.btnImpactCalculation, "Calculate impacts");
+      // 
+      // flowLayoutPanel
+      // 
+      this.flowLayoutPanel.Controls.Add(this.btnImpactCalculation);
       // 
       // splitContainer
@@ -84,4 +104,6 @@
 
     #endregion
+
+    protected System.Windows.Forms.Button btnImpactCalculation;
   }
 }
Index: /stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/RegressionSolutionView.cs	(revision 14022)
@@ -20,7 +20,13 @@
 #endregion
 
+using System;
+using System.Linq;
+using System.Threading.Tasks;
 using System.Windows.Forms;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Data.Views;
 using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.Problems.DataAnalysis.Views {
@@ -35,4 +41,30 @@
       get { return (RegressionSolutionBase)base.Content; }
       set { base.Content = value; }
+    }
+
+    protected override void SetEnabledStateOfControls() {
+      base.SetEnabledStateOfControls();
+      btnImpactCalculation.Enabled = Content != null && !Locked;
+    }
+
+    protected virtual void btnImpactCalculation_Click(object sender, EventArgs e) {
+      var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm;
+      var view = new StringConvertibleArrayView();
+      view.Caption = Content.Name + " Variable Impacts";
+      view.Show();
+
+      Task.Factory.StartNew(() => {
+        try {
+          mainForm.AddOperationProgressToView(view, "Calculating variable impacts for " + Content.Name);
+
+          var impacts = RegressionSolutionVariableImpactsCalculator.CalculateImpacts(Content);
+          var impactArray = new DoubleArray(impacts.Select(i => i.Item2).ToArray());
+          impactArray.ElementNames = impacts.Select(i => i.Item1);
+          view.Content = (DoubleArray)impactArray.AsReadOnly();
+        }
+        finally {
+          mainForm.RemoveOperationProgressFromView(view);
+        }
+      });
     }
 
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 14022)
@@ -143,4 +143,5 @@
     </Compile>
     <Compile Include="Implementation\Regression\RegressionEnsembleSolution.cs" />
+    <Compile Include="Implementation\Regression\RegressionSolutionVariableImpactsCalculator.cs" />
     <Compile Include="Implementation\TimeSeriesPrognosis\Models\ConstantTimeSeriesPrognosisModel.cs" />
     <Compile Include="Implementation\TimeSeriesPrognosis\Models\TimeSeriesPrognosisAutoRegressiveModel.cs" />
@@ -313,4 +314,8 @@
       <Private>False</Private>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+    </ProjectReference>
   </ItemGroup>
   <ItemGroup />
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 14022)
@@ -80,4 +80,7 @@
     }
 
+    public virtual IEnumerable<int> AllIndices {
+      get { return Enumerable.Range(0, Dataset.Rows); }
+    }
     public virtual IEnumerable<int> TrainingIndices {
       get {
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 14022)
@@ -110,4 +110,15 @@
     }
 
+    public IEnumerable<double> TargetVariableValues {
+      get { return Dataset.GetDoubleValues(TargetVariable); }
+    }
+    public IEnumerable<double> TargetVariableTrainingValues {
+      get { return Dataset.GetDoubleValues(TargetVariable, TrainingIndices); }
+    }
+    public IEnumerable<double> TargetVariableTestValues {
+      get { return Dataset.GetDoubleValues(TargetVariable, TestIndices); }
+    }
+
+
     [StorableConstructor]
     protected RegressionProblemData(bool deserializing) : base(deserializing) { }
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs	(revision 14022)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionVariableImpactsCalculator.cs	(revision 14022)
@@ -0,0 +1,179 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  [Item("RegressionSolution Impacts Calculator", "Calculation of the impacts of input variables for any regression solution")]
+  public sealed class RegressionSolutionVariableImpactsCalculator : ParameterizedNamedItem {
+    public enum ReplacementMethodEnum {
+      Median,
+      Average,
+      Shuffle,
+      Noise
+    }
+
+    public enum DataPartitionEnum {
+      Training,
+      Test,
+      All
+    }
+
+    private const string ReplacementParameterName = "Replacement Method";
+    private const string DataPartitionParameterName = "DataPartition";
+
+    public IFixedValueParameter<EnumValue<ReplacementMethodEnum>> ReplacementParameter {
+      get { return (IFixedValueParameter<EnumValue<ReplacementMethodEnum>>)Parameters[ReplacementParameterName]; }
+    }
+    public IFixedValueParameter<EnumValue<DataPartitionEnum>> DataPartitionParameter {
+      get { return (IFixedValueParameter<EnumValue<DataPartitionEnum>>)Parameters[DataPartitionParameterName]; }
+    }
+
+    public ReplacementMethodEnum ReplacementMethod {
+      get { return ReplacementParameter.Value.Value; }
+      set { ReplacementParameter.Value.Value = value; }
+    }
+    public DataPartitionEnum DataPartition {
+      get { return DataPartitionParameter.Value.Value; }
+      set { DataPartitionParameter.Value.Value = value; }
+    }
+
+
+    [StorableConstructor]
+    private RegressionSolutionVariableImpactsCalculator(bool deserializing) : base(deserializing) { }
+    private RegressionSolutionVariableImpactsCalculator(RegressionSolutionVariableImpactsCalculator original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RegressionSolutionVariableImpactsCalculator(this, cloner);
+    }
+
+    public RegressionSolutionVariableImpactsCalculator()
+      : base() {
+      Parameters.Add(new FixedValueParameter<EnumValue<ReplacementMethodEnum>>(ReplacementParameterName, "The replacement method for variables during impact calculation.", new EnumValue<ReplacementMethodEnum>(ReplacementMethodEnum.Median)));
+      Parameters.Add(new FixedValueParameter<EnumValue<DataPartitionEnum>>(DataPartitionParameterName, "The data partition on which the impacts are calculated.", new EnumValue<DataPartitionEnum>(DataPartitionEnum.Training)));
+    }
+
+    //mkommend: annoying name clash with static method, open to better naming suggestions
+    public IEnumerable<Tuple<string, double>> Calculate(IRegressionSolution solution) {
+      return CalculateImpacts(solution, DataPartition, ReplacementMethod);
+    }
+
+    public static IEnumerable<Tuple<string, double>> CalculateImpacts(IRegressionSolution solution,
+      DataPartitionEnum data = DataPartitionEnum.Training,
+      ReplacementMethodEnum replacement = ReplacementMethodEnum.Median) {
+
+      var problemData = solution.ProblemData;
+      var dataset = problemData.Dataset;
+
+      IEnumerable<int> rows;
+      IEnumerable<double> targetValues;
+      double originalR2 = -1;
+
+      OnlineCalculatorError error;
+
+      switch (data) {
+        case DataPartitionEnum.All:
+          rows = solution.ProblemData.AllIndices;
+          targetValues = problemData.TargetVariableValues.ToList();
+          originalR2 = OnlinePearsonsRCalculator.Calculate(problemData.TargetVariableValues, solution.EstimatedValues, out error);
+          if (error != OnlineCalculatorError.None) throw new InvalidOperationException("Error during R² calculation.");
+          originalR2 = originalR2 * originalR2;
+          break;
+        case DataPartitionEnum.Training:
+          rows = problemData.TrainingIndices;
+          targetValues = problemData.TargetVariableTrainingValues.ToList();
+          originalR2 = solution.TrainingRSquared;
+          break;
+        case DataPartitionEnum.Test:
+          rows = problemData.TestIndices;
+          targetValues = problemData.TargetVariableTestValues.ToList();
+          originalR2 = solution.TestRSquared;
+          break;
+        default: throw new ArgumentException(string.Format("DataPartition {0} cannot be handled.", data));
+      }
+
+
+      var impacts = new Dictionary<string, double>();
+      var modifiableDataset = ((Dataset)dataset).ToModifiable();
+
+      foreach (var inputVariable in problemData.AllowedInputVariables) {
+        var newEstimates = EvaluateModelWithReplacedVariable(solution.Model, inputVariable, modifiableDataset, rows, replacement);
+        var newR2 = OnlinePearsonsRCalculator.Calculate(targetValues, newEstimates, out error);
+        if (error != OnlineCalculatorError.None) throw new InvalidOperationException("Error during R² calculation with replaced inputs.");
+
+        newR2 = newR2 * newR2;
+        var impact = originalR2 - newR2;
+        impacts[inputVariable] = impact;
+      }
+      return impacts.OrderByDescending(i => i.Value).Select(i => Tuple.Create(i.Key, i.Value));
+    }
+
+    private static IEnumerable<double> EvaluateModelWithReplacedVariable(IRegressionModel model, string variable, ModifiableDataset dataset, IEnumerable<int> rows, ReplacementMethodEnum replacement = ReplacementMethodEnum.Median) {
+      var originalValues = dataset.GetReadOnlyDoubleValues(variable).ToList();
+      double replacementValue;
+      List<double> replacementValues;
+      IRandom rand;
+
+      switch (replacement) {
+        case ReplacementMethodEnum.Median:
+          replacementValue = rows.Select(r => originalValues[r]).Median();
+          replacementValues = Enumerable.Repeat(replacementValue, dataset.Rows).ToList();
+          break;
+        case ReplacementMethodEnum.Average:
+          replacementValue = rows.Select(r => originalValues[r]).Average();
+          replacementValues = Enumerable.Repeat(replacementValue, dataset.Rows).ToList();
+          break;
+        case ReplacementMethodEnum.Shuffle:
+          // new var has same empirical distribution but the relation to y is broken
+          rand = new FastRandom(31415);
+          replacementValues = rows.Select(r => originalValues[r]).Shuffle(rand).ToList();
+          break;
+        case ReplacementMethodEnum.Noise:
+          var avg = rows.Select(r => originalValues[r]).Average();
+          var stdDev = rows.Select(r => originalValues[r]).StandardDeviation();
+          rand = new FastRandom(31415);
+          replacementValues = rows.Select(_ => NormalDistributedRandom.NextDouble(rand, avg, stdDev)).ToList();
+          break;
+
+        default:
+          throw new ArgumentException(string.Format("ReplacementMethod {0} cannot be handled.", replacement));
+      }
+
+      dataset.ReplaceVariable(variable, replacementValues);
+      //mkommend: ToList is used on purpose to avoid lazy evaluation that could result in wrong estimates due to variable replacements
+      var estimates = model.GetEstimatedValues(dataset, rows).ToList();
+      dataset.ReplaceVariable(variable, originalValues);
+
+      return estimates;
+    }
+  }
+}
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 14022)
@@ -36,4 +36,5 @@
     IntRange TestPartition { get; }
 
+    IEnumerable<int> AllIndices { get; }
     IEnumerable<int> TrainingIndices { get; }
     IEnumerable<int> TestIndices { get; }
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs	(revision 14022)
@@ -20,7 +20,13 @@
 #endregion
 
+using System.Collections.Generic;
+
 namespace HeuristicLab.Problems.DataAnalysis {
   public interface IRegressionProblemData : IDataAnalysisProblemData {
     string TargetVariable { get; set; }
+
+    IEnumerable<double> TargetVariableValues { get; }
+    IEnumerable<double> TargetVariableTrainingValues { get; }
+    IEnumerable<double> TargetVariableTestValues { get; }
   }
 }
Index: /stable/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame
===================================================================
--- /stable/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame	(revision 14021)
+++ /stable/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame	(revision 14022)
@@ -38,4 +38,5 @@
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]  
+  [PluginDependency("HeuristicLab.Random", "3.3")]
   public class HeuristicLabProblemsDataAnalysisPlugin : PluginBase {
   }
