Changeset 2454
- Timestamp:
- 10/29/09 16:07:55 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs
r2385 r2454 155 155 solutionProc.AddSubOperator(namesExtractor); 156 156 solutionProc.AddSubOperator(predictorBuilder); 157 VariableQualityImpactCalculator qualityImpactCalculator = new VariableQualityImpactCalculator(); 158 qualityImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart"; 159 qualityImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd"; 160 161 solutionProc.AddSubOperator(qualityImpactCalculator); 162 163 NodeBasedVariableImpactCalculator nodeImpactCalculator = new NodeBasedVariableImpactCalculator(); 164 nodeImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart"; 165 nodeImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd"; 166 167 solutionProc.AddSubOperator(nodeImpactCalculator); 168 157 169 #endregion 158 170 … … 165 177 model.SetMetaData("TreeSize", gpModel.Size); 166 178 model.SetMetaData("TreeHeight", gpModel.Height); 179 #region variable impacts 180 ItemList qualityImpacts = bestModelScope.GetVariableValue<ItemList>(ModelingResult.VariableQualityImpact.ToString(), false); 181 foreach (ItemList row in qualityImpacts) { 182 string variableName = ((StringData)row[0]).Data; 183 double impact = ((DoubleData)row[1]).Data; 184 model.SetVariableResult(ModelingResult.VariableQualityImpact, variableName, impact); 185 model.AddInputVariable(variableName); 186 } 187 ItemList nodeImpacts = bestModelScope.GetVariableValue<ItemList>(ModelingResult.VariableNodeImpact.ToString(), false); 188 foreach (ItemList row in nodeImpacts) { 189 string variableName = ((StringData)row[0]).Data; 190 double impact = ((DoubleData)row[1]).Data; 191 model.SetVariableResult(ModelingResult.VariableNodeImpact, variableName, impact); 192 model.AddInputVariable(variableName); 193 } 194 #endregion 195 167 196 } 168 197 } -
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj
r2361 r2454 36 36 <DebugSymbols>true</DebugSymbols> 37 37 <OutputPath>bin\x86\Debug\</OutputPath> 38 <DefineConstants> DEBUG;TRACE</DefineConstants>38 <DefineConstants>TRACE;DEBUG</DefineConstants> 39 39 <DebugType>full</DebugType> 40 40 <PlatformTarget>x86</PlatformTarget> … … 48 48 <PlatformTarget>x86</PlatformTarget> 49 49 <ErrorReport>prompt</ErrorReport> 50 <AllowUnsafeBlocks>false</AllowUnsafeBlocks> 50 51 </PropertyGroup> 51 52 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> … … 85 86 <Compile Include="BaseClasses\TreeEvaluatorBase.cs" /> 86 87 <Compile Include="DefaultStructureIdentificationOperators.cs" /> 88 <Compile Include="Evaluators\NodeBasedVariableImpactCalculator.cs" /> 87 89 <Compile Include="HL3TreeEvaluatorInjector.cs" /> 88 90 <Compile Include="HL2TreeEvaluatorInjector.cs" /> -
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearClassification.cs
r2363 r2454 54 54 } 55 55 56 protected override IAnalyzerModel CreateLRModel(IScope bestModelScope) { 57 var model = new AnalyzerModel(); 56 protected override void CreateSpecificLRModel(IScope bestModelScope, IAnalyzerModel model) { 58 57 DefaultClassificationOperators.PopulateAnalyzerModel(bestModelScope, model); 59 return model;60 58 } 61 59 } -
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
r2440 r2454 215 215 seq.AddSubOperator(namesExtractor); 216 216 seq.AddSubOperator(predictorBuilder); 217 VariableQualityImpactCalculator qualityImpactCalculator = new VariableQualityImpactCalculator(); 218 qualityImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart"; 219 qualityImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd"; 220 221 seq.AddSubOperator(qualityImpactCalculator); 217 222 #endregion 218 223 219 224 seq.AddSubOperator(CreateModelAnalyzerOperator()); 225 226 227 220 228 221 229 op.OperatorGraph.AddOperator(seq); … … 230 238 protected virtual IAnalyzerModel CreateLRModel(IScope bestModelScope) { 231 239 var model = new AnalyzerModel(); 240 CreateSpecificLRModel(bestModelScope, model); 241 #region variable impacts 242 ItemList qualityImpacts = bestModelScope.GetVariableValue<ItemList>(ModelingResult.VariableQualityImpact.ToString(), false); 243 foreach (ItemList row in qualityImpacts) { 244 string variableName = ((StringData)row[0]).Data; 245 double impact = ((DoubleData)row[1]).Data; 246 model.SetVariableResult(ModelingResult.VariableQualityImpact, variableName, impact); 247 model.AddInputVariable(variableName); 248 } 249 #endregion 250 return model; 251 } 252 253 protected virtual void CreateSpecificLRModel(IScope bestModelScope, IAnalyzerModel model) { 232 254 DefaultRegressionOperators.PopulateAnalyzerModel(bestModelScope, model); 233 return model;234 255 } 235 256 … … 257 278 #region persistence 258 279 public override object Clone(IDictionary<Guid, object> clonedObjects) { 259 LinearRegression clone = (LinearRegression) 280 LinearRegression clone = (LinearRegression)base.Clone(clonedObjects); 260 281 clone.engine = (IEngine)Auxiliary.Clone(Engine, clonedObjects); 261 282 return clone; -
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearTimeSeriesPrognosis.cs
r2363 r2454 73 73 } 74 74 75 protected override IAnalyzerModel CreateLRModel(IScope bestModelScope) { 76 var model = new AnalyzerModel(); 75 protected override void CreateSpecificLRModel(IScope bestModelScope, IAnalyzerModel model) { 77 76 DefaultTimeSeriesOperators.PopulateAnalyzerModel(bestModelScope, model); 78 return model;79 77 } 80 78 } -
trunk/sources/HeuristicLab.Modeling/3.2/DefaultModelAnalyzerOperators.cs
r2440 r2454 37 37 } 38 38 39 #region variable impacts40 VariableEvaluationImpactCalculator evaluationImpactCalculator = new VariableEvaluationImpactCalculator();41 evaluationImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";42 evaluationImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";43 VariableQualityImpactCalculator qualityImpactCalculator = new VariableQualityImpactCalculator();44 qualityImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart";45 qualityImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd";46 47 seq.AddSubOperator(evaluationImpactCalculator);48 seq.AddSubOperator(qualityImpactCalculator);49 #endregion50 51 39 op.OperatorGraph.AddOperator(seq); 52 40 op.OperatorGraph.InitialOperator = seq; … … 72 60 } 73 61 74 ItemList evaluationImpacts = modelScope.GetVariableValue<ItemList>(ModelingResult.VariableEvaluationImpact.ToString(), false);75 ItemList qualityImpacts = modelScope.GetVariableValue<ItemList>(ModelingResult.VariableQualityImpact.ToString(), false);76 foreach (ItemList row in evaluationImpacts) {77 string variableName = ((StringData)row[0]).Data;78 double impact = ((DoubleData)row[1]).Data;79 model.SetVariableResult(ModelingResult.VariableEvaluationImpact, variableName, impact);80 model.AddInputVariable(variableName);81 }82 foreach (ItemList row in qualityImpacts) {83 string variableName = ((StringData)row[0]).Data;84 double impact = ((DoubleData)row[1]).Data;85 model.SetVariableResult(ModelingResult.VariableQualityImpact, variableName, impact);86 model.AddInputVariable(variableName);87 }88 89 62 return model; 90 63 } -
trunk/sources/HeuristicLab.Modeling/3.2/ModelingResult.cs
r2428 r2454 76 76 77 77 VariableQualityImpact, 78 VariableEvaluationImpact 78 VariableEvaluationImpact, 79 VariableNodeImpact 79 80 } 80 81 } -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorClassification.cs
r2356 r2454 54 54 55 55 56 protected override IAnalyzerModel CreateSVMModel(IScope bestModelScope) { 57 IAnalyzerModel model = new AnalyzerModel(); 58 model.SetMetaData("Cost", bestModelScope.GetVariableValue<DoubleData>("Cost", false).Data); 59 model.SetMetaData("Nu", bestModelScope.GetVariableValue<DoubleData>("Nu", false).Data); 56 protected override void CreateSpecificSVMModel(IScope bestModelScope, IAnalyzerModel model) { 60 57 DefaultClassificationOperators.PopulateAnalyzerModel(bestModelScope, model); 61 return model;62 58 } 63 59 } -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
r2440 r2454 453 453 seqProc.AddSubOperator(CreateEvaluator("Training")); 454 454 seqProc.AddSubOperator(predictorBuilder); 455 456 #region variable impacts 457 VariableQualityImpactCalculator qualityImpactCalculator = new VariableQualityImpactCalculator(); 458 qualityImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "ValidationSamplesStart"; 459 qualityImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "ValidationSamplesEnd"; 460 461 seqProc.AddSubOperator(qualityImpactCalculator); 462 #endregion 463 464 455 465 seqProc.AddSubOperator(CreateModelAnalyzerOperator()); 456 466 … … 470 480 model.SetMetaData("Cost", bestModelScope.GetVariableValue<DoubleData>("Cost", false).Data); 471 481 model.SetMetaData("Nu", bestModelScope.GetVariableValue<DoubleData>("Nu", false).Data); 482 #region variable impacts 483 ItemList qualityImpacts = bestModelScope.GetVariableValue<ItemList>(ModelingResult.VariableQualityImpact.ToString(), false); 484 foreach (ItemList row in qualityImpacts) { 485 string variableName = ((StringData)row[0]).Data; 486 double impact = ((DoubleData)row[1]).Data; 487 model.SetVariableResult(ModelingResult.VariableQualityImpact, variableName, impact); 488 model.AddInputVariable(variableName); 489 } 490 #endregion 491 492 CreateSpecificSVMModel(bestModelScope, model); 493 494 return model; 495 } 496 497 protected virtual void CreateSpecificSVMModel(IScope bestModelScope, IAnalyzerModel model) { 472 498 DefaultRegressionOperators.PopulateAnalyzerModel(bestModelScope, model); 473 474 return model;475 499 } 476 500 … … 498 522 #region persistence 499 523 public override object Clone(IDictionary<Guid, object> clonedObjects) { 500 SupportVectorRegression clone = (SupportVectorRegression) 524 SupportVectorRegression clone = (SupportVectorRegression)base.Clone(clonedObjects); 501 525 clone.engine = (IEngine)Auxiliary.Clone(Engine, clonedObjects); 502 526 return clone; -
trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorTimeSeriesPrognosis.cs
r2361 r2454 72 72 } 73 73 74 protected override IAnalyzerModel CreateSVMModel(IScope bestModelScope) { 75 var model = new AnalyzerModel(); 76 model.SetMetaData("Cost", bestModelScope.GetVariableValue<DoubleData>("Cost", false).Data); 77 model.SetMetaData("Nu", bestModelScope.GetVariableValue<DoubleData>("Nu", false).Data); 74 protected override void CreateSpecificSVMModel(IScope bestModelScope, IAnalyzerModel model) { 78 75 DefaultTimeSeriesOperators.PopulateAnalyzerModel(bestModelScope, model); 79 return model;80 76 } 81 77 }
Note: See TracChangeset
for help on using the changeset viewer.