Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17501 for branches


Ignore:
Timestamp:
04/09/20 13:10:50 (5 years ago)
Author:
mkommend
Message:

#2971: Merged trunk changes into branch, corrected project files (output path for all configurations, reference paths), resolved merge conflicts in InteractiveSymbolicDataAnalysisSolutionSimplifierView.

Location:
branches/2971_named_intervals
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis

  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj

    r16851 r17501  
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    6060  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6161    <DebugSymbols>true</DebugSymbols>
    62     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     62    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    6363    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6464    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <Optimize>true</Optimize>
     
    8080  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    8181    <DebugSymbols>true</DebugSymbols>
    82     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     82    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    8383    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8484    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <Optimize>true</Optimize>
     
    104104      <Private>False</Private>
    105105    </Reference>
    106     <Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
    107       <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
    108       <Private>False</Private>
    109     </Reference>
    110106    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    111107      <SpecificVersion>False</SpecificVersion>
     
    183179    </Reference>
    184180    <Reference Include="System.Drawing" />
    185     <Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
    186       <HintPath>..\..\packages\System.Drawing.Common.4.5.1\lib\net461\System.Drawing.Common.dll</HintPath>
    187       <Private>False</Private>
    188     </Reference>
    189181    <Reference Include="System.Xml.Linq">
    190182      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     
    270262    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    271263      <SpecificVersion>False</SpecificVersion>
    272       <HintPath>..\..\bin\HEAL.Attic.dll</HintPath>
     264      <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath>
    273265      <Private>False</Private>
    274266    </Reference>
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views

  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj

    r16790 r17501  
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    6060  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6161    <DebugSymbols>true</DebugSymbols>
    62     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     62    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    6363    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6464    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <Optimize>true</Optimize>
     
    8080  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    8181    <DebugSymbols>true</DebugSymbols>
    82     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     82    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    8383    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8484    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <Optimize>true</Optimize>
     
    130130      <SpecificVersion>False</SpecificVersion>
    131131      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath>
     132      <Private>False</Private>
    132133    </Reference>
    133134    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     
    139140      <SpecificVersion>False</SpecificVersion>
    140141      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
     142      <Private>False</Private>
    141143    </Reference>
    142144    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.Designer.cs

    r17207 r17501  
    5757      this.grpViewHost = new System.Windows.Forms.GroupBox();
    5858      this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart();
     59      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
    5960      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    6061      this.splitContainer.Panel1.SuspendLayout();
     
    148149      this.btnSimplify.Text = "Simplify";
    149150      this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
     151      this.toolTip.SetToolTip(this.btnSimplify, "Simplifies the model structure based on mathematical simplification rules.");
    150152      this.btnSimplify.UseVisualStyleBackColor = true;
    151153      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
     
    162164      this.btnOptimizeConstants.Text = "Optimize";
    163165      this.btnOptimizeConstants.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
     166      this.toolTip.SetToolTip(this.btnOptimizeConstants, "Optimizes the numerical constants of the model. \r\nIf the algorithm converges, opt" +
     167        "imization is stopped.");
    164168      this.btnOptimizeConstants.UseVisualStyleBackColor = true;
    165169      this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click);
     
    226230    protected System.Windows.Forms.Button btnOptimizeConstants;
    227231    private System.Windows.Forms.Label treeStatusValue;
     232    private System.Windows.Forms.ToolTip toolTip;
    228233  }
    229234}
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r17207 r17501  
    166166    private void Content_Changed(object sender, EventArgs e) {
    167167      UpdateView();
     168      SetEnabledStateOfControls();
    168169    }
    169170
     
    193194
    194195      progress.Start("Calculate Impact and Replacement Values ...");
     196      cancellationTokenSource = new CancellationTokenSource();
    195197      progress.CanBeStopped = true;
    196       cancellationTokenSource = new CancellationTokenSource();
    197 
    198       var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));
    199 
    200198      try {
    201         await Task.Delay(500, cancellationTokenSource.Token); // wait for progressbar to finish animation
    202       } catch (OperationCanceledException) { }
    203       var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2);
    204       foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) {
    205         foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value);
    206       }
    207  
    208       foreach (var kvp in impactAndReplacementValues) {
    209         nodeImpacts[kvp.Key] = kvp.Value.Item1;
    210       }
    211 
    212       var regressionProblemData = Content.ProblemData as IRegressionProblemData;
    213       if (regressionProblemData != null) {
    214         var interpreter = new IntervalInterpreter();
    215         var variableRanges = regressionProblemData.VariableRanges.GetIntervals();
    216         IDictionary<ISymbolicExpressionTreeNode, Interval> intervals;
    217         interpreter.GetSymbolicExpressionTreeIntervals(tree, variableRanges, out intervals);
    218         foreach (var kvp in intervals) {
    219           nodeIntervals[kvp.Key] = kvp.Value;
    220         }
    221       }
    222      
    223 
    224       progress.Finish();
     199        var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));
     200        try {
     201          await Task.Delay(300, cancellationTokenSource.Token); // wait for progressbar to finish animation
     202        } catch (OperationCanceledException) { }
     203
     204        var replacementValues = impactAndReplacementValues.ToDictionary(x => x.Key, x => x.Value.Item2);
     205        foreach (var pair in replacementValues.Where(pair => !(pair.Key is ConstantTreeNode))) {
     206          foldedNodes[pair.Key] = MakeConstantTreeNode(pair.Value);
     207        }
     208       
     209        foreach (var pair in impactAndReplacementValues) {
     210          nodeImpacts[pair.Key] = pair.Value.Item1;
     211        }
     212
     213        var regressionProblemData = Content.ProblemData as IRegressionProblemData;
     214        if (regressionProblemData != null) {
     215          var interpreter = new IntervalInterpreter();
     216          var variableRanges = regressionProblemData.VariableRanges.GetIntervals();
     217          IDictionary<ISymbolicExpressionTreeNode, Interval> intervals;
     218          interpreter.GetSymbolicExpressionTreeIntervals(tree, variableRanges, out intervals);
     219          foreach (var kvp in intervals) {
     220            nodeIntervals[kvp.Key] = kvp.Value;
     221          }
     222        }
     223      } finally {
     224        progress.Finish();
     225      }
     226
    225227      progress.CanBeStopped = false;
    226228      PaintNodeImpacts();
     
    335337    private async void btnOptimizeConstants_Click(object sender, EventArgs e) {
    336338      progress.Start("Optimizing Constants ...");
    337       var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
    338       var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
    339       await Task.Delay(500); // wait for progressbar to finish animation
    340       UpdateModel(newTree); // UpdateModel calls Progress.Finish (via Content_Changed)
     339      cancellationTokenSource = new CancellationTokenSource();
     340      progress.CanBeStopped = true;
     341      try {
     342        var tree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
     343
     344        var newTree = await Task.Run(() => OptimizeConstants(tree, progress));
     345        try {
     346          await Task.Delay(300, cancellationTokenSource.Token); // wait for progressbar to finish animation
     347        } catch (OperationCanceledException) { }
     348        UpdateModel(newTree); // triggers progress.Finish after calculating the node impacts when model is changed
     349      } catch {
     350        progress.Finish();
     351      }
    341352    }
    342353  }
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views

  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.cs

    r17304 r17501  
    2525using System.Threading;
    2626using System.Threading.Tasks;
     27using System.Windows.Forms;
    2728using HeuristicLab.Common;
    2829using HeuristicLab.Data;
     
    4041    private CancellationTokenSource cancellationToken = new CancellationTokenSource();
    4142    private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>();
    42     private bool attachedToProgress = false;
    4343
    4444    public new IClassificationSolution Content {
     
    8787      }
    8888    }
    89     protected override void OnHidden(EventArgs e) {
    90       base.OnHidden(e);
     89    protected override void OnVisibleChanged(EventArgs e) {
     90      base.OnVisibleChanged(e);
     91      if (!this.Visible) {
     92        cancellationToken.Cancel();
     93      }
     94    }
     95
     96    protected override void OnClosed(FormClosedEventArgs e) {
     97      base.OnClosed(e);
    9198      cancellationToken.Cancel();
    92 
    93       if (attachedToProgress) {
    94         Progress.Hide(this);
    95         attachedToProgress = false;
    96       }
    9799    }
    98100
     
    133135      variableImpactsArrayView.Caption = Content.Name + " Variable Impacts";
    134136      progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name);
    135       attachedToProgress = true;
    136137      cancellationToken = new CancellationTokenSource();
    137138
     
    145146          .ToList();
    146147
    147         List<Tuple<string, double>> impacts = null;
    148         await Task.Run(() => { impacts = CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedClassValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress); });
    149         if (impacts == null) { return; }
     148        var impacts = await Task.Run(() => CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedClassValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress));
    150149
    151150        rawVariableImpacts.AddRange(impacts);
    152151        UpdateOrdering();
     152      } catch (OperationCanceledException) {
    153153      } finally {
    154         if (attachedToProgress) {
    155           Progress.Hide(this);
    156           attachedToProgress = false;
    157         }
     154        Progress.Hide(this);
    158155      }
    159156    }
     
    180177      var clonedModel = (IClassificationModel)model.Clone();
    181178      foreach (var variableName in originalVariableOrdering) {
    182         if (cancellationToken.Token.IsCancellationRequested) { return null; }
     179        token.ThrowIfCancellationRequested();
    183180        progress.ProgressValue = (double)++i / count;
    184181        progress.Message = string.Format("Calculating impact for variable {0} ({1} of {2})", variableName, i, count);
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r17146 r17501  
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    6060  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6161    <DebugSymbols>true</DebugSymbols>
    62     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     62    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    6363    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6464    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <Optimize>true</Optimize>
     
    8080  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    8181    <DebugSymbols>true</DebugSymbols>
    82     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     82    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    8383    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8484    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <Optimize>true</Optimize>
     
    100100  <ItemGroup>
    101101    <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    102       <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath>
     102      <HintPath>..\..\..\..\trunk\bin\ALGLIB-3.7.0.dll</HintPath>
    103103      <Private>False</Private>
    104104    </Reference>
     
    106106      <SpecificVersion>False</SpecificVersion>
    107107      <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath>
     108      <Private>False</Private>
    108109    </Reference>
    109110    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4">
     
    153154      <SpecificVersion>False</SpecificVersion>
    154155      <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath>
     156      <Private>False</Private>
    155157    </Reference>
    156158    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionVariableImpactsView.cs

    r17304 r17501  
    2525using System.Threading;
    2626using System.Threading.Tasks;
     27using System.Windows.Forms;
    2728using HeuristicLab.Common;
    2829using HeuristicLab.Data;
     
    4041    private CancellationTokenSource cancellationToken = new CancellationTokenSource();
    4142    private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>();
    42     private bool attachedToProgress = false;
    4343
    4444    public new IRegressionSolution Content {
     
    8888    }
    8989
    90     protected override void OnHidden(EventArgs e) {
    91       base.OnHidden(e);
     90    protected override void OnVisibleChanged(EventArgs e) {
     91      base.OnVisibleChanged(e);
     92      if (!this.Visible) {
     93        cancellationToken.Cancel();
     94      }
     95    }
     96
     97    protected override void OnClosed(FormClosedEventArgs e) {
     98      base.OnClosed(e);
    9299      cancellationToken.Cancel();
    93 
    94       if (attachedToProgress) {
    95         Progress.Hide(this);
    96         attachedToProgress = false;
    97       }
    98100    }
    99101
     
    132134      variableImpactsArrayView.Caption = Content.Name + " Variable Impacts";
    133135      var progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name);
    134       attachedToProgress = true;
    135136      cancellationToken = new CancellationTokenSource();
    136137
     
    144145          .ToList();
    145146
    146         List<Tuple<string, double>> impacts = null;
    147         await Task.Run(() => { impacts = CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress); });
    148         if (impacts == null) { return; }
     147        var impacts = await Task.Run(() => CalculateVariableImpacts(originalVariableOrdering, Content.Model, problemData, Content.EstimatedValues, dataPartition, replMethod, factorReplMethod, cancellationToken.Token, progress));
    149148
    150149        rawVariableImpacts.AddRange(impacts);
    151150        UpdateOrdering();
     151      } catch (OperationCanceledException) {
    152152      } finally {
    153         if (attachedToProgress) {
    154           Progress.Hide(this);
    155           attachedToProgress = false;
    156         }
     153        Progress.Hide(this);
    157154      }
    158155    }
     
    179176
    180177      foreach (var variableName in originalVariableOrdering) {
    181         if (cancellationToken.Token.IsCancellationRequested) { return null; }
     178        token.ThrowIfCancellationRequested();
    182179        progress.ProgressValue = (double)++i / count;
    183180        progress.Message = string.Format("Calculating impact for variable {0} ({1} of {2})", variableName, i, count);
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4

  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r16896 r17501  
    5151    <DebugType>pdbonly</DebugType>
    5252    <Optimize>true</Optimize>
    53     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     53    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    5454    <DefineConstants>TRACE</DefineConstants>
    5555    <ErrorReport>prompt</ErrorReport>
     
    6060  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    6161    <DebugSymbols>true</DebugSymbols>
    62     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     62    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    6363    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6464    <DebugType>full</DebugType>
     
    6969  </PropertyGroup>
    7070  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    71     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     71    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    7272    <DefineConstants>TRACE</DefineConstants>
    7373    <Optimize>true</Optimize>
     
    8080  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    8181    <DebugSymbols>true</DebugSymbols>
    82     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     82    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    8383    <DefineConstants>DEBUG;TRACE</DefineConstants>
    8484    <DebugType>full</DebugType>
     
    8989  </PropertyGroup>
    9090  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    91     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     91    <OutputPath>..\..\..\..\trunk\bin\</OutputPath>
    9292    <DefineConstants>TRACE</DefineConstants>
    9393    <Optimize>true</Optimize>
     
    101101    <Reference Include="ALGLIB-3.7.0">
    102102      <HintPath>..\..\..\..\trunk\bin\ALGLIB-3.7.0.dll</HintPath>
    103       <Private>False</Private>
    104     </Reference>
    105     <Reference Include="Google.Protobuf, Version=3.6.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
    106       <HintPath>..\..\packages\Google.Protobuf.3.6.1\lib\net45\Google.Protobuf.dll</HintPath>
    107103      <Private>False</Private>
    108104    </Reference>
     
    307303    <Compile Include="Implementation\Classification\ThresholdCalculators\ThresholdCalculator.cs" />
    308304    <None Include="HeuristicLab.snk" />
    309     <None Include="packages.config" />
    310305    <None Include="Plugin.cs.frame" />
    311306    <None Include="Properties\AssemblyInfo.cs.frame" />
     
    334329    <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    335330      <SpecificVersion>False</SpecificVersion>
    336       <HintPath>..\..\bin\HEAL.Attic.dll</HintPath>
     331      <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath>
    337332      <Private>False</Private>
    338333    </Reference>
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionVariableImpactsCalculator.cs

    r17210 r17501  
    2626using System.Collections.Generic;
    2727using System.Linq;
     28using HEAL.Attic;
    2829using HeuristicLab.Common;
    2930using HeuristicLab.Core;
    3031using HeuristicLab.Data;
    3132using HeuristicLab.Parameters;
    32 using HEAL.Attic;
    3333using HeuristicLab.Random;
    3434
     
    173173
    174174      IList originalValues = null;
    175       IList replacementValues = GetReplacementValues(modifiableDataset, variableName, model, rows, targetValues, out originalValues, replacementMethod, factorReplacementMethod);
    176 
    177       double newValue = CalculateQualityForReplacement(model, modifiableDataset, variableName, originalValues, rows, replacementValues, targetValues);
     175      IList replacementValues = GetReplacementValues(modifiableDataset, variableName, model, problemData.AllowedInputVariables, rows, targetValues, out originalValues, replacementMethod, factorReplacementMethod);
     176
     177      double newValue = CalculateQualityForReplacement(model, modifiableDataset, problemData.AllowedInputVariables, variableName, originalValues, rows, replacementValues, targetValues);
    178178      double impact = quality - newValue;
    179179
     
    184184      string variableName,
    185185      IClassificationModel model,
     186      IEnumerable<string> allowedInputVariables,
    186187      IEnumerable<int> rows,
    187188      IEnumerable<double> targetValues,
     
    196197      } else if (modifiableDataset.VariableHasType<string>(variableName)) {
    197198        originalValues = modifiableDataset.GetReadOnlyStringValues(variableName).ToList();
    198         replacementValues = GetReplacementValuesForString(model, modifiableDataset, variableName, rows, (List<string>)originalValues, targetValues, factorReplacementMethod);
     199        replacementValues = GetReplacementValuesForString(model, modifiableDataset, allowedInputVariables, variableName, rows, (List<string>)originalValues, targetValues, factorReplacementMethod);
    199200      } else {
    200201        throw new NotSupportedException("Variable not supported");
     
    254255    private static IList GetReplacementValuesForString(IClassificationModel model,
    255256      ModifiableDataset modifiableDataset,
     257      IEnumerable<string> allowedInputVariables,
    256258      string variableName,
    257259      IEnumerable<int> rows,
     
    270272            List<string> curReplacementValues = Enumerable.Repeat(repl, modifiableDataset.Rows).ToList();
    271273            //fholzing: this result could be used later on (theoretically), but is neglected for better readability/method consistency
    272             var newValue = CalculateQualityForReplacement(model, modifiableDataset, variableName, originalValues, rows, curReplacementValues, targetValues);
     274            var newValue = CalculateQualityForReplacement(model, modifiableDataset, allowedInputVariables, variableName, originalValues, rows, curReplacementValues, targetValues);
    273275            var curQuality = newValue;
    274276
     
    308310      IClassificationModel model,
    309311      ModifiableDataset modifiableDataset,
     312      IEnumerable<string> allowedInputVariables,
    310313      string variableName,
    311314      IList originalValues,
     
    317320      var discModel = model as IDiscriminantFunctionClassificationModel;
    318321      if (discModel != null) {
    319         var problemData = new ClassificationProblemData(modifiableDataset, modifiableDataset.VariableNames, model.TargetVariable);
     322        var problemData = new ClassificationProblemData(modifiableDataset, allowedInputVariables, model.TargetVariable);
    320323        discModel.RecalculateModelParameters(problemData, rows);
    321324      }
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs

    r17210 r17501  
    7474      classValues = (double[])original.classValues.Clone();
    7575      thresholds = (double[])original.thresholds.Clone();
     76      thresholdCalculator = (IDiscriminantFunctionThresholdCalculator)original.thresholdCalculator.Clone();
    7677    }
    7778
Note: See TracChangeset for help on using the changeset viewer.