- Timestamp:
- 04/09/20 13:10:50 (5 years ago)
- Location:
- branches/2971_named_intervals
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis merged: 17422-17423
- Property svn:mergeinfo changed
-
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 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath> $(SolutionDir)\bin\</OutputPath>53 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 69 69 </PropertyGroup> 70 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 71 <OutputPath> $(SolutionDir)\bin\</OutputPath>71 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 72 72 <DefineConstants>TRACE</DefineConstants> 73 73 <Optimize>true</Optimize> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 89 89 </PropertyGroup> 90 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 91 <OutputPath> $(SolutionDir)\bin\</OutputPath>91 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 92 92 <DefineConstants>TRACE</DefineConstants> 93 93 <Optimize>true</Optimize> … … 104 104 <Private>False</Private> 105 105 </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>110 106 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 107 <SpecificVersion>False</SpecificVersion> … … 183 179 </Reference> 184 180 <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>189 181 <Reference Include="System.Xml.Linq"> 190 182 <RequiredTargetFramework>3.5</RequiredTargetFramework> … … 270 262 <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 271 263 <SpecificVersion>False</SpecificVersion> 272 <HintPath>..\..\ bin\HEAL.Attic.dll</HintPath>264 <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath> 273 265 <Private>False</Private> 274 266 </Reference> -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Views merged: 17377-17378,17380,17430
- Property svn:mergeinfo changed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
r16790 r17501 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath> $(SolutionDir)\bin\</OutputPath>53 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 69 69 </PropertyGroup> 70 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 71 <OutputPath> $(SolutionDir)\bin\</OutputPath>71 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 72 72 <DefineConstants>TRACE</DefineConstants> 73 73 <Optimize>true</Optimize> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 89 89 </PropertyGroup> 90 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 91 <OutputPath> $(SolutionDir)\bin\</OutputPath>91 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 92 92 <DefineConstants>TRACE</DefineConstants> 93 93 <Optimize>true</Optimize> … … 130 130 <SpecificVersion>False</SpecificVersion> 131 131 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Core.Views-3.3.dll</HintPath> 132 <Private>False</Private> 132 133 </Reference> 133 134 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> … … 139 140 <SpecificVersion>False</SpecificVersion> 140 141 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 142 <Private>False</Private> 141 143 </Reference> 142 144 <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 57 57 this.grpViewHost = new System.Windows.Forms.GroupBox(); 58 58 this.treeChart = new HeuristicLab.Problems.DataAnalysis.Symbolic.Views.InteractiveSymbolicExpressionTreeChart(); 59 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 59 60 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 60 61 this.splitContainer.Panel1.SuspendLayout(); … … 148 149 this.btnSimplify.Text = "Simplify"; 149 150 this.btnSimplify.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; 151 this.toolTip.SetToolTip(this.btnSimplify, "Simplifies the model structure based on mathematical simplification rules."); 150 152 this.btnSimplify.UseVisualStyleBackColor = true; 151 153 this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click); … … 162 164 this.btnOptimizeConstants.Text = "Optimize"; 163 165 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."); 164 168 this.btnOptimizeConstants.UseVisualStyleBackColor = true; 165 169 this.btnOptimizeConstants.Click += new System.EventHandler(this.btnOptimizeConstants_Click); … … 226 230 protected System.Windows.Forms.Button btnOptimizeConstants; 227 231 private System.Windows.Forms.Label treeStatusValue; 232 private System.Windows.Forms.ToolTip toolTip; 228 233 } 229 234 } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
r17207 r17501 166 166 private void Content_Changed(object sender, EventArgs e) { 167 167 UpdateView(); 168 SetEnabledStateOfControls(); 168 169 } 169 170 … … 193 194 194 195 progress.Start("Calculate Impact and Replacement Values ..."); 196 cancellationTokenSource = new CancellationTokenSource(); 195 197 progress.CanBeStopped = true; 196 cancellationTokenSource = new CancellationTokenSource();197 198 var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));199 200 198 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 225 227 progress.CanBeStopped = false; 226 228 PaintNodeImpacts(); … … 335 337 private async void btnOptimizeConstants_Click(object sender, EventArgs e) { 336 338 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 } 341 352 } 342 353 } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis.Views merged: 17426
- Property svn:mergeinfo changed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationSolutionVariableImpactsView.cs
r17304 r17501 25 25 using System.Threading; 26 26 using System.Threading.Tasks; 27 using System.Windows.Forms; 27 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Data; … … 40 41 private CancellationTokenSource cancellationToken = new CancellationTokenSource(); 41 42 private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>(); 42 private bool attachedToProgress = false;43 43 44 44 public new IClassificationSolution Content { … … 87 87 } 88 88 } 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); 91 98 cancellationToken.Cancel(); 92 93 if (attachedToProgress) {94 Progress.Hide(this);95 attachedToProgress = false;96 }97 99 } 98 100 … … 133 135 variableImpactsArrayView.Caption = Content.Name + " Variable Impacts"; 134 136 progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name); 135 attachedToProgress = true;136 137 cancellationToken = new CancellationTokenSource(); 137 138 … … 145 146 .ToList(); 146 147 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)); 150 149 151 150 rawVariableImpacts.AddRange(impacts); 152 151 UpdateOrdering(); 152 } catch (OperationCanceledException) { 153 153 } finally { 154 if (attachedToProgress) { 155 Progress.Hide(this); 156 attachedToProgress = false; 157 } 154 Progress.Hide(this); 158 155 } 159 156 } … … 180 177 var clonedModel = (IClassificationModel)model.Clone(); 181 178 foreach (var variableName in originalVariableOrdering) { 182 if (cancellationToken.Token.IsCancellationRequested) { return null; }179 token.ThrowIfCancellationRequested(); 183 180 progress.ProgressValue = (double)++i / count; 184 181 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 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath> $(SolutionDir)\bin\</OutputPath>53 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 69 69 </PropertyGroup> 70 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 71 <OutputPath> $(SolutionDir)\bin\</OutputPath>71 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 72 72 <DefineConstants>TRACE</DefineConstants> 73 73 <Optimize>true</Optimize> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 89 89 </PropertyGroup> 90 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 91 <OutputPath> $(SolutionDir)\bin\</OutputPath>91 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 92 92 <DefineConstants>TRACE</DefineConstants> 93 93 <Optimize>true</Optimize> … … 100 100 <ItemGroup> 101 101 <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> 103 103 <Private>False</Private> 104 104 </Reference> … … 106 106 <SpecificVersion>False</SpecificVersion> 107 107 <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath> 108 <Private>False</Private> 108 109 </Reference> 109 110 <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4"> … … 153 154 <SpecificVersion>False</SpecificVersion> 154 155 <HintPath>..\..\..\..\trunk\bin\HeuristicLab.Data.Views-3.3.dll</HintPath> 156 <Private>False</Private> 155 157 </Reference> 156 158 <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 25 25 using System.Threading; 26 26 using System.Threading.Tasks; 27 using System.Windows.Forms; 27 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Data; … … 40 41 private CancellationTokenSource cancellationToken = new CancellationTokenSource(); 41 42 private List<Tuple<string, double>> rawVariableImpacts = new List<Tuple<string, double>>(); 42 private bool attachedToProgress = false;43 43 44 44 public new IRegressionSolution Content { … … 88 88 } 89 89 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); 92 99 cancellationToken.Cancel(); 93 94 if (attachedToProgress) {95 Progress.Hide(this);96 attachedToProgress = false;97 }98 100 } 99 101 … … 132 134 variableImpactsArrayView.Caption = Content.Name + " Variable Impacts"; 133 135 var progress = Progress.Show(this, "Calculating variable impacts for " + Content.Name); 134 attachedToProgress = true;135 136 cancellationToken = new CancellationTokenSource(); 136 137 … … 144 145 .ToList(); 145 146 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)); 149 148 150 149 rawVariableImpacts.AddRange(impacts); 151 150 UpdateOrdering(); 151 } catch (OperationCanceledException) { 152 152 } finally { 153 if (attachedToProgress) { 154 Progress.Hide(this); 155 attachedToProgress = false; 156 } 153 Progress.Hide(this); 157 154 } 158 155 } … … 179 176 180 177 foreach (var variableName in originalVariableOrdering) { 181 if (cancellationToken.Token.IsCancellationRequested) { return null; }178 token.ThrowIfCancellationRequested(); 182 179 progress.ProgressValue = (double)++i / count; 183 180 progress.Message = string.Format("Calculating impact for variable {0} ({1} of {2})", variableName, i, count); -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis/3.4 merged: 17422-17423
- Property svn:mergeinfo changed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r16896 r17501 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath> $(SolutionDir)\bin\</OutputPath>53 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 60 60 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 61 61 <DebugSymbols>true</DebugSymbols> 62 <OutputPath> $(SolutionDir)\bin\</OutputPath>62 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 63 63 <DefineConstants>DEBUG;TRACE</DefineConstants> 64 64 <DebugType>full</DebugType> … … 69 69 </PropertyGroup> 70 70 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 71 <OutputPath> $(SolutionDir)\bin\</OutputPath>71 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 72 72 <DefineConstants>TRACE</DefineConstants> 73 73 <Optimize>true</Optimize> … … 80 80 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 81 81 <DebugSymbols>true</DebugSymbols> 82 <OutputPath> $(SolutionDir)\bin\</OutputPath>82 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 83 83 <DefineConstants>DEBUG;TRACE</DefineConstants> 84 84 <DebugType>full</DebugType> … … 89 89 </PropertyGroup> 90 90 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 91 <OutputPath> $(SolutionDir)\bin\</OutputPath>91 <OutputPath>..\..\..\..\trunk\bin\</OutputPath> 92 92 <DefineConstants>TRACE</DefineConstants> 93 93 <Optimize>true</Optimize> … … 101 101 <Reference Include="ALGLIB-3.7.0"> 102 102 <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>107 103 <Private>False</Private> 108 104 </Reference> … … 307 303 <Compile Include="Implementation\Classification\ThresholdCalculators\ThresholdCalculator.cs" /> 308 304 <None Include="HeuristicLab.snk" /> 309 <None Include="packages.config" />310 305 <None Include="Plugin.cs.frame" /> 311 306 <None Include="Properties\AssemblyInfo.cs.frame" /> … … 334 329 <Reference Include="HEAL.Attic, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 335 330 <SpecificVersion>False</SpecificVersion> 336 <HintPath>..\..\ bin\HEAL.Attic.dll</HintPath>331 <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath> 337 332 <Private>False</Private> 338 333 </Reference> -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionVariableImpactsCalculator.cs
r17210 r17501 26 26 using System.Collections.Generic; 27 27 using System.Linq; 28 using HEAL.Attic; 28 29 using HeuristicLab.Common; 29 30 using HeuristicLab.Core; 30 31 using HeuristicLab.Data; 31 32 using HeuristicLab.Parameters; 32 using HEAL.Attic;33 33 using HeuristicLab.Random; 34 34 … … 173 173 174 174 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); 178 178 double impact = quality - newValue; 179 179 … … 184 184 string variableName, 185 185 IClassificationModel model, 186 IEnumerable<string> allowedInputVariables, 186 187 IEnumerable<int> rows, 187 188 IEnumerable<double> targetValues, … … 196 197 } else if (modifiableDataset.VariableHasType<string>(variableName)) { 197 198 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); 199 200 } else { 200 201 throw new NotSupportedException("Variable not supported"); … … 254 255 private static IList GetReplacementValuesForString(IClassificationModel model, 255 256 ModifiableDataset modifiableDataset, 257 IEnumerable<string> allowedInputVariables, 256 258 string variableName, 257 259 IEnumerable<int> rows, … … 270 272 List<string> curReplacementValues = Enumerable.Repeat(repl, modifiableDataset.Rows).ToList(); 271 273 //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); 273 275 var curQuality = newValue; 274 276 … … 308 310 IClassificationModel model, 309 311 ModifiableDataset modifiableDataset, 312 IEnumerable<string> allowedInputVariables, 310 313 string variableName, 311 314 IList originalValues, … … 317 320 var discModel = model as IDiscriminantFunctionClassificationModel; 318 321 if (discModel != null) { 319 var problemData = new ClassificationProblemData(modifiableDataset, modifiableDataset.VariableNames, model.TargetVariable);322 var problemData = new ClassificationProblemData(modifiableDataset, allowedInputVariables, model.TargetVariable); 320 323 discModel.RecalculateModelParameters(problemData, rows); 321 324 } -
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r17210 r17501 74 74 classValues = (double[])original.classValues.Clone(); 75 75 thresholds = (double[])original.thresholds.Clone(); 76 thresholdCalculator = (IDiscriminantFunctionThresholdCalculator)original.thresholdCalculator.Clone(); 76 77 } 77 78
Note: See TracChangeset
for help on using the changeset viewer.