Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/09 16:07:55 (15 years ago)
Author:
gkronber
Message:

Implemented NodeBasedVariableImpactCalculator. #793

Location:
trunk/sources/HeuristicLab.GP.StructureIdentification/3.3
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/DefaultStructureIdentificationOperators.cs

    r2385 r2454  
    155155      solutionProc.AddSubOperator(namesExtractor);
    156156      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
    157169      #endregion
    158170
     
    165177      model.SetMetaData("TreeSize", gpModel.Size);
    166178      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
    167196    }
    168197  }
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/HeuristicLab.GP.StructureIdentification-3.3.csproj

    r2361 r2454  
    3636    <DebugSymbols>true</DebugSymbols>
    3737    <OutputPath>bin\x86\Debug\</OutputPath>
    38     <DefineConstants>DEBUG;TRACE</DefineConstants>
     38    <DefineConstants>TRACE;DEBUG</DefineConstants>
    3939    <DebugType>full</DebugType>
    4040    <PlatformTarget>x86</PlatformTarget>
     
    4848    <PlatformTarget>x86</PlatformTarget>
    4949    <ErrorReport>prompt</ErrorReport>
     50    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
    5051  </PropertyGroup>
    5152  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
     
    8586    <Compile Include="BaseClasses\TreeEvaluatorBase.cs" />
    8687    <Compile Include="DefaultStructureIdentificationOperators.cs" />
     88    <Compile Include="Evaluators\NodeBasedVariableImpactCalculator.cs" />
    8789    <Compile Include="HL3TreeEvaluatorInjector.cs" />
    8890    <Compile Include="HL2TreeEvaluatorInjector.cs" />
Note: See TracChangeset for help on using the changeset viewer.