Index: branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/HeuristicLab.VariableInteractionNetworks.Views-3.3.csproj
===================================================================
--- branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/HeuristicLab.VariableInteractionNetworks.Views-3.3.csproj	(revision 12321)
+++ branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/HeuristicLab.VariableInteractionNetworks.Views-3.3.csproj	(revision 12460)
@@ -147,4 +147,9 @@
     <None Include="Plugin.cs.frame" />
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="VariableInteractionNetworkView.resx">
+      <DependentUpon>VariableInteractionNetworkView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/HeuristicLab.VariableInteractionNetworks-3.3.csproj
===================================================================
--- branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/HeuristicLab.VariableInteractionNetworks-3.3.csproj	(revision 12321)
+++ branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/HeuristicLab.VariableInteractionNetworks-3.3.csproj	(revision 12460)
@@ -37,19 +37,28 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
@@ -76,4 +85,9 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.MainForm.WindowsForms-3.3.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath>
       <Private>False</Private>
     </Reference>
@@ -151,4 +165,5 @@
     <Compile Include="Plugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="SymbolicDataAnalysisVariableImpactsAnalyzer.cs" />
   </ItemGroup>
   <ItemGroup>
Index: branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/SymbolicDataAnalysisVariableImpactsAnalyzer.cs
===================================================================
--- branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/SymbolicDataAnalysisVariableImpactsAnalyzer.cs	(revision 12460)
+++ branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/SymbolicDataAnalysisVariableImpactsAnalyzer.cs	(revision 12460)
@@ -0,0 +1,230 @@
+﻿using System;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression;
+
+namespace HeuristicLab.VariableInteractionNetworks
+{
+    [Item("SymbolicRegressionVariableImpactsAnalyzer", "An analyzer which calculates variable impacts based on the average node impacts from the tree")]
+    [StorableClass]
+    public class SymbolicRegressionVariableImpactsAnalyzer : SymbolicDataAnalysisAnalyzer
+    {
+        private const string UpdateCounterParameterName = "UpdateCounter";
+        private const string UpdateIntervalParameterName = "UpdateInterval";
+        public const string QualityParameterName = "Quality";
+        private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+        private const string ProblemDataParameterName = "ProblemData";
+        private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
+        private const string MaxCOIterationsParameterName = "MaxCOIterations";
+        private const string EstimationLimitsParameterName = "EstimationLimits";
+        private const string EvaluatorParameterName = "Evaluator";
+
+        private const string VariableFrequenciesParameterName = "VariableFrequencies";
+        private const string VariableImpactsParameterName = "AverageVariableImpacts";
+        private const string PercentageBestParameterName = "PercentageBest";
+        private const string LastGenerationsParameterName = "LastGenerations";
+        private const string MaximumGenerationsParameterName = "MaximumGenerations";
+        private const string OptimizedConstantsParameterName = "OptimizedConstants";
+        
+        private readonly SymbolicDataAnalysisExpressionTreeSimplifier simplifier;
+        private readonly SymbolicRegressionSolutionImpactValuesCalculator impactsCalculator;
+
+        #region parameters
+        public ValueParameter<IntValue> UpdateCounterParameter
+        {
+            get { return (ValueParameter<IntValue>)Parameters[UpdateCounterParameterName]; }
+        }
+        public ValueParameter<IntValue> UpdateIntervalParameter
+        {
+            get { return (ValueParameter<IntValue>)Parameters[UpdateIntervalParameterName]; }
+        }
+        public IScopeTreeLookupParameter<DoubleValue> QualityParameter
+        {
+            get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+        }
+        public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter
+        {
+            get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+        }
+        public ILookupParameter<IRegressionProblemData> ProblemDataParameter
+        {
+            get { return (ILookupParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName]; }
+        }
+        public ILookupParameter<BoolValue> ApplyLinearScalingParameter
+        {
+            get { return (ILookupParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
+        }
+        public IFixedValueParameter<IntValue> MaxCOIterationsParameter
+        {
+            get { return (IFixedValueParameter<IntValue>)Parameters[MaxCOIterationsParameterName]; }
+        }
+        public ILookupParameter<DoubleLimit> EstimationLimitsParameter
+        {
+            get { return (ILookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+        }
+        public ILookupParameter<ISymbolicRegressionSingleObjectiveEvaluator> EvaluatorParameter
+        {
+            get { return (ILookupParameter<ISymbolicRegressionSingleObjectiveEvaluator>)Parameters[EvaluatorParameterName]; }
+        }
+        public ILookupParameter<DataTable> VariableImpactsParameter
+        {
+            get { return (ILookupParameter<DataTable>)Parameters[VariableImpactsParameterName]; }
+        }
+        public IFixedValueParameter<PercentValue> PercentageBestParameter
+        {
+            get { return (IFixedValueParameter<PercentValue>)Parameters[PercentageBestParameterName]; }
+        }
+        public IFixedValueParameter<IntValue> LastGenerationsParameter
+        {
+            get { return (IFixedValueParameter<IntValue>)Parameters[LastGenerationsParameterName]; }
+        }
+        public IFixedValueParameter<BoolValue> OptimizedParameter
+        {
+            get { return (IFixedValueParameter<BoolValue>)Parameters[OptimizedConstantsParameterName]; }
+        }
+        private ILookupParameter<IntValue> MaximumGenerationsParameter
+        {
+            get { return (ILookupParameter<IntValue>)Parameters[MaximumGenerationsParameterName]; }
+        }
+        #endregion
+
+        #region parameter properties
+        public int UpdateCounter
+        {
+            get { return UpdateCounterParameter.Value.Value; }
+            set { UpdateCounterParameter.Value.Value = value; }
+        }
+        public int UpdateInterval
+        {
+            get { return UpdateIntervalParameter.Value.Value; }
+            set { UpdateIntervalParameter.Value.Value = value; }
+        }
+        #endregion
+
+        public SymbolicRegressionVariableImpactsAnalyzer()
+        {
+            Parameters.Add(new ValueParameter<IntValue>(UpdateCounterParameterName, new IntValue(0)));
+            Parameters.Add(new ValueParameter<IntValue>(UpdateIntervalParameterName, new IntValue(1)));
+            Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName));
+            Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName));
+            Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities."));
+            Parameters.Add(new LookupParameter<BoolValue>(ApplyLinearScalingParameterName));
+            Parameters.Add(new LookupParameter<DoubleLimit>(EstimationLimitsParameterName));
+            Parameters.Add(new FixedValueParameter<IntValue>(MaxCOIterationsParameterName));         
+            Parameters.Add(new LookupParameter<DataTable>(VariableImpactsParameterName, "The relative variable relevance calculated as the average relative variable frequency over the whole run."));
+            Parameters.Add(new FixedValueParameter<PercentValue>(PercentageBestParameterName));
+            Parameters.Add(new FixedValueParameter<IntValue>(LastGenerationsParameterName));
+            Parameters.Add(new FixedValueParameter<BoolValue>(OptimizedConstantsParameterName));
+            Parameters.Add(new LookupParameter<IntValue>(MaximumGenerationsParameterName, "The maximum number of generations which should be processed."));
+
+            simplifier = new SymbolicDataAnalysisExpressionTreeSimplifier();
+            impactsCalculator = new SymbolicRegressionSolutionImpactValuesCalculator();
+        }
+
+        [StorableConstructor]
+        protected SymbolicRegressionVariableImpactsAnalyzer(bool deserializing) : base(deserializing) { }
+
+        protected SymbolicRegressionVariableImpactsAnalyzer(SymbolicRegressionVariableImpactsAnalyzer original, Cloner cloner)
+            : base(original, cloner)
+        {
+        }
+
+        public override IDeepCloneable Clone(Cloner cloner)
+        {
+            return new SymbolicRegressionVariableImpactsAnalyzer(this, cloner);
+        }
+
+        public override IOperation Apply()
+        {
+            #region Update counter & update interval
+            UpdateCounter++;
+            if (UpdateCounter != UpdateInterval)
+            {
+                return base.Apply();
+            }
+            UpdateCounter = 0;
+            #endregion
+            var results = ResultCollectionParameter.ActualValue;
+            int maxGen = MaximumGenerationsParameter.ActualValue.Value;
+            int gen = ((IntValue)results["Generations"].Value).Value;
+            int lastGen = LastGenerationsParameter.Value.Value;
+
+            if (lastGen > maxGen)
+                lastGen = maxGen;
+            if (maxGen - gen < lastGen)
+                return base.Apply();
+
+            var trees = SymbolicExpressionTree.ToArray();
+            var qualities = QualityParameter.ActualValue.ToArray();
+
+            Array.Sort(qualities, trees);
+            Array.Reverse(qualities);
+            Array.Reverse(trees);
+
+            var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
+            var problemData = ProblemDataParameter.ActualValue;
+            var applyLinearScaling = ApplyLinearScalingParameter.ActualValue.Value;
+            var maxCOIterations = MaxCOIterationsParameter.Value.Value; // fixed value parameter => Value
+            var estimationLimits = EstimationLimitsParameter.ActualValue; // lookup parameter => ActualValue
+            var percentageBest = PercentageBestParameter.Value.Value;
+            var optimizedConstants = OptimizedParameter.Value.Value;
+
+            var allowedInputVariables = problemData.AllowedInputVariables.ToList();
+            var variableImpacts = allowedInputVariables.ToDictionary(x => x, x => 0.0);
+            DataTable datatable;
+            if (VariableImpactsParameter.ActualValue == null)
+            {
+                datatable = new DataTable("Variable impacts", "Average impact of variables over the population");
+                datatable.VisualProperties.XAxisTitle = "Generation";
+                datatable.VisualProperties.YAxisTitle = "Average variable impact";
+                VariableImpactsParameter.ActualValue = datatable;
+                results.Add(new Result("Average variable impacts", "The relative variable relevance calculated as the average relative variable frequency over the whole run.", new DataTable()));
+                
+                foreach (var v in allowedInputVariables)
+                {
+                    datatable.Rows.Add(new DataRow(v) { VisualProperties = { StartIndexZero = true } });
+                }
+                VariableImpactsParameter.ActualValue = datatable;
+            }
+            datatable = VariableImpactsParameter.ActualValue;
+            int nTrees = (int)Math.Round(trees.Length * percentageBest);
+
+            // simplify trees
+            var simplifiedTrees = trees.Take(nTrees).Select(x => simplifier.Simplify(x));
+            var variableCounts = problemData.AllowedInputVariables.ToDictionary(x => x, x => simplifiedTrees.Count(t => t.IterateNodesPrefix().Any(n => n is VariableTreeNode && ((VariableTreeNode)n).VariableName == x)));
+            foreach (var simplifiedTree in simplifiedTrees)
+            {
+                if (optimizedConstants == true)
+                {
+                    SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, simplifiedTree, problemData, problemData.TrainingIndices, applyLinearScaling, maxCOIterations, estimationLimits.Upper, estimationLimits.Lower);
+                }
+
+                var quality = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(interpreter, simplifiedTree, estimationLimits.Lower, estimationLimits.Upper, problemData, problemData.TrainingIndices, applyLinearScaling);
+
+                var model = new SymbolicRegressionModel(simplifiedTree, interpreter, estimationLimits.Lower, estimationLimits.Upper);
+                var variables = simplifiedTree.IterateNodesPrefix().Where(x => x is VariableTreeNode).GroupBy(x => ((VariableTreeNode)x).VariableName);
+
+                foreach (var g in variables)
+                {
+                    var avgImpact = g.Average(x => impactsCalculator.CalculateImpactValue(model, x, problemData, problemData.TrainingIndices, quality));
+                    variableImpacts[g.Key] += avgImpact;
+                }
+            }
+
+            foreach (var pair in variableImpacts)
+            {
+                datatable.Rows[pair.Key].Values.Add(pair.Value / variableCounts[pair.Key]);
+            }
+            results["Average variable impacts"].Value = datatable;
+            return base.Apply();
+        }
+    }
+}
