Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/17/15 19:23:51 (9 years ago)
Author:
gkronber
Message:

#2205: derived selection problem from BinaryProblem (now PPP can be used as feature selection algorithm)

Location:
branches/OptimizationNetworks/HeuristicLab.Networks/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/FeatureSelection Network/SelectionProblem.cs

    r12323 r12326  
    77using HeuristicLab.Parameters;
    88using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     9using HeuristicLab.Problems.Binary;
    910
    1011namespace HeuristicLab.Networks.FeatureSelection_Network {
    11   public class SelectionProblem : SingleObjectiveBasicProblem<BinaryVectorEncoding> {
     12  public class SelectionProblem : BinaryProblem {
    1213    private Func<BinaryVector, double> eval;
    13 
    14     public virtual int Length {
    15       get { return Encoding.Length; }
    16       set { Encoding.Length = value; }
    17     }
    1814
    1915    protected SelectionProblem(SelectionProblem original, Cloner cloner)
     
    3026
    3127      var lengthParam = new ValueParameter<IntValue>("Length");
     28
     29
    3230      lengthParam.ValueChanged += (o, s) => { Length = lengthParam.Value.Value; };
     31      // we cannot use the fixed value parameter from BinaryProblem in the network
     32      Parameters.Remove("Length");
    3333      Parameters.Add(lengthParam);
    3434    }
     
    3838    }
    3939
    40     public override double Evaluate(Individual individual, IRandom random) {
    41       return eval(individual.BinaryVector());
     40    public override double Evaluate(BinaryVector vector, IRandom random) {
     41      return eval(vector);
     42
    4243    }
    4344
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/HeuristicLab.Networks-3.3.csproj

    r12324 r12326  
    145145    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    146146      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     147      <Private>False</Private>
     148    </Reference>
     149    <Reference Include="HeuristicLab.Problems.Binary-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     150      <SpecificVersion>False</SpecificVersion>
     151      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Binary-3.3.dll</HintPath>
    147152      <Private>False</Private>
    148153    </Reference>
Note: See TracChangeset for help on using the changeset viewer.