Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/30/13 16:54:43 (12 years ago)
Author:
sforsten
Message:

#1980:

  • added multiple discretizer to GAssist
  • created ensembles for LCS problems and edited CrossValidation to use them
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/LearningClassifierSystems/HeuristicLab.Optimization.Operators.LCS/3.3/GAssist/ILAS/ILASOperator.cs

    r9392 r9411  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
     24using System.Linq;
    2325using HeuristicLab.Common;
    2426using HeuristicLab.Core;
     
    3739      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    3840    }
    39     public ILookupParameter<IGAssistNichesProblemData> ProblemDataParameter {
    40       get { return (ILookupParameter<IGAssistNichesProblemData>)Parameters["ProblemData"]; }
     41    public ILookupParameter<IGAssistProblemData> ProblemDataParameter {
     42      get { return (ILookupParameter<IGAssistProblemData>)Parameters["ProblemData"]; }
    4143    }
    4244    public IValueLookupParameter<IntValue> NumberOfStrataParameter {
     
    5658      : base() {
    5759      Parameters.Add(new LookupParameter<IRandom>("Random", "The random generator to use."));
    58       Parameters.Add(new LookupParameter<IGAssistNichesProblemData>("ProblemData", ""));
     60      Parameters.Add(new LookupParameter<IGAssistProblemData>("ProblemData", ""));
    5961      Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfStrata", ""));
    6062      Parameters.Add(new ValueLookupParameter<ItemList<ItemList<IntValue>>>("Strata", ""));
     
    103105        }
    104106
     107        if (strata.Any(x => x.Count() == 0)) {
     108          throw new ArgumentException("At least one strata is empty. Use less strata or add more data.");
     109        }
     110
    105111        StrataParameter.ActualValue = strata;
    106112      }
Note: See TracChangeset for help on using the changeset viewer.