类 ScatterSearchV1

java.lang.Object
weka.attributeSelection.ASSearch
weka.attributeSelection.ScatterSearchV1
所有已实现的接口:
Serializable, OptionHandler, RevisionHandler, TechnicalInformationHandler

public class ScatterSearchV1 extends ASSearch implements OptionHandler, TechnicalInformationHandler
Class for performing the Sequential Scatter Search.

Scatter Search :

Performs an Scatter Search through the space of attribute subsets. Start with a population of many significants and diverses subset stops when the result is higher than a given treshold or there's not more improvement
For more information see:

Felix Garcia Lopez (2004). Solving feature subset selection problem by a Parallel Scatter Search. Elsevier.

Valid options are:

 -Z <num>
  Specify the number of subsets to generate 
  in the initial population..
 -T <threshold>
  Specify the treshold used for considering when a subset is significant.
 -R <0 = greedy combination | 1 = reduced greedy combination >
  Specify the kind of combiantion 
  for using it in the combination method.
 -S <seed>
  Set the random number seed.
  (default = 1)
 -D
  Verbose output for monitoring the search.
BibTeX:
 @book{Lopez2004,
    author = {Felix Garcia Lopez},
    month = {October},
    publisher = {Elsevier},
    title = {Solving feature subset selection problem by a Parallel Scatter Search},
    year = {2004},
    language = {English}
 }
 

from the Book: Solving feature subset selection problem by a Parallel Scatter Search, Felix Garcia Lopez.

版本:
$Revision: 6277 $
作者:
Adrian Pino (apinoa@facinf.uho.edu.cu)
另请参阅:
  • 字段详细资料

    • TAGS_SELECTION

      public static final Tag[] TAGS_SELECTION
  • 构造器详细资料

    • ScatterSearchV1

      public ScatterSearchV1()
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this search method
      返回:
      a description of the search suitable for displaying in the explorer/experimenter gui
    • getTechnicalInformation

      public TechnicalInformation getTechnicalInformation()
      Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
      指定者:
      getTechnicalInformation 在接口中 TechnicalInformationHandler
      返回:
      the technical information about this class
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 ASSearch
      返回:
      the revision
    • thresholdTipText

      public String thresholdTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setThreshold

      public void setThreshold(double threshold)
      Set the treshold
      参数:
      threshold - for identifyng significant subsets
    • getThreshold

      public double getThreshold()
      Get the treshold
      返回:
      the treshold that subsets most overcome to be considered as significants
    • populationSizeTipText

      public String populationSizeTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setPopulationSize

      public void setPopulationSize(int size)
      Set the population size
      参数:
      size - the number of subset in the initial population
    • getPopulationSize

      public int getPopulationSize()
      Get the population size
      返回:
      the number of subsets to generate in the initial population
    • combinationTipText

      public String combinationTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setCombination

      public void setCombination(SelectedTag c)
      Set the kind of combination
      参数:
      c - the kind of combination of the search
    • getCombination

      public SelectedTag getCombination()
      Get the combination
      返回:
      the kind of combination used in the Combination method
    • seedTipText

      public String seedTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setSeed

      public void setSeed(int s)
      set the seed for random number generation
      参数:
      s - seed value
    • getSeed

      public int getSeed()
      get the value of the random number generator's seed
      返回:
      the seed for random number generation
    • debugTipText

      public String debugTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setDebug

      public void setDebug(boolean d)
      Set whether verbose output should be generated.
      参数:
      d - true if output is to be verbose.
    • getDebug

      public boolean getDebug()
      Get whether output is to be verbose
      返回:
      true if output will be verbose
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      返回:
      an enumeration of all the available options.
    • setOptions

      public void setOptions(String[] options) throws Exception
      Parses a given list of options. Valid options are:

      -Z
      Specify the number of subsets to generate in the initial population.

      -T
      Specify the treshold used for considering when a subset is significant.

      -R
      Specify the kind of combiantion.

      -S
      Set the random number seed. (default = 1) -D
      Verbose output for monitoring the search (default = false)

      指定者:
      setOptions 在接口中 OptionHandler
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • getOptions

      public String[] getOptions()
      Gets the current settings of ScatterSearchV1.
      指定者:
      getOptions 在接口中 OptionHandler
      返回:
      an array of strings suitable for passing to setOptions()
    • toString

      public String toString()
      returns a description of the search.
      覆盖:
      toString 在类中 Object
      返回:
      a description of the search as a String.
    • search

      public int[] search(ASEvaluation ASEval, Instances data) throws Exception
      Searches the attribute subset space using Scatter Search.
      指定者:
      search 在类中 ASSearch
      参数:
      ASEval - the attribute evaluator to guide the search
      data - the training instances.
      返回:
      an array of selected attribute indexes
      抛出:
      Exception - if the search can't be completed
    • GenerateReferenceSet

      public void GenerateReferenceSet(List<ScatterSearchV1.Subset> ReferenceSet, int bestSolutions, int divSolutions)
      Generate the a ReferenceSet containing the n best solutions and the m most diverse solutions of the initial Population.
      参数:
      ReferenceSet - the ReferenceSet for storing these solutions
      bestSolutions - the number of the most pure solutions.
      divSolutions - the number of the most diverses solutions acording to the bestSolutions.
    • UpdateReferenceSet

      public void UpdateReferenceSet(int numBestSolutions, int numDivsSolutions)
      Update the ReferenceSet putting the new obtained Solutions there
      参数:
      numBestSolutions - the number of the most pure solutions.
      numDivsSolutions - the number of the most diverses solutions acording to the bestSolutions.
    • ImproveSolutions

      public void ImproveSolutions() throws Exception
      Improve the solutions previously combined by adding the attributes that improve that solution
      抛出:
      Exception - if there is some trouble evaluating the candidate solutions
    • CombineParents

      public void CombineParents() throws Exception
      Combine all the posible pair solutions existing in the Population
      抛出:
      Exception - if there is some trouble evaluating the new childs
    • CreatePopulation

      public void CreatePopulation(int popSize) throws Exception
      Create the initial Population
      参数:
      popSize - the size of the initial population
      抛出:
      Exception - if there is a trouble evaluating any solution
    • RankEachAttribute

      public List<ScatterSearchV1.Subset> RankEachAttribute() throws Exception
      Rank all the attributes individually acording to their merits
      返回:
      an ordered List of Subsets with just one attribute
      抛出:
      Exception - if the evaluation can not be completed
    • getBestgen

      public ScatterSearchV1.Subset getBestgen(ScatterSearchV1.Subset subset, BitSet gens) throws Exception
      Evaluate each gen of a BitSet inserted in a Subset and get the most significant for that Subset
      返回:
      a new Subset with the union of subset and the best gen of gens. in case that there's not improvement with each gen return null
      抛出:
      Exception - if the evaluation of can not be completed
    • bubbleSubsetSort

      public List<ScatterSearchV1.Subset> bubbleSubsetSort(List<ScatterSearchV1.Subset> subsetList)
      Sort a List of subsets according to their merits
      参数:
      subsetList - the subsetList to be ordered
      返回:
      a List with ordered subsets
    • getIndexofBiggest

      public int getIndexofBiggest(List<Integer> simDif)
      get the index in a List where this have the biggest number
      参数:
      simDif - the Lists of numbers for getting from them the index of the bigger
      返回:
      an index that represents where the bigest number is.
    • getAllBits

      public BitSet getAllBits(List<ScatterSearchV1.Subset> subsets)
      Save in Bitset all the gens that are in many others subsets.
      参数:
      subsets - the Lists of subsets for getting from them all their gens
      返回:
      a Bitset with all the gens contained in many others subsets.
    • InitPopulation

      public void InitPopulation(int popSize)
      Creating space for introducing the population
      参数:
      popSize - the number of subset in the initial population
    • joinSubsets

      public ScatterSearchV1.Subset joinSubsets(ScatterSearchV1.Subset subset1, ScatterSearchV1.Subset subset2) throws Exception
      Join two subsets
      参数:
      subset1 - one of the subsets
      subset2 - the other subset
      返回:
      a new Subset that is te result of the Join
      抛出:
      Exception - if the evaluation of the subsets can not be completed
    • intersectSubsets

      public ScatterSearchV1.Subset intersectSubsets(ScatterSearchV1.Subset subset1, ScatterSearchV1.Subset subset2) throws Exception
      Intersects two subsets
      参数:
      subset1 - one of the subsets
      subset2 - the other subset
      返回:
      a new Subset that is te result of the intersection
      抛出:
      Exception - if the evaluation of the subsets can not be completed
    • simetricDif

      public ScatterSearchV1.Subset simetricDif(ScatterSearchV1.Subset subset1, ScatterSearchV1.Subset subset2, int mode) throws Exception
      抛出:
      Exception
    • generateRandomNumber

      public int generateRandomNumber(int limit)
    • calculateTreshhold

      public double calculateTreshhold() throws Exception
      Calculate the treshold of a dataSet given an evaluator
      返回:
      the treshhold of the dataSet
      抛出:
      Exception - if the calculation can not be completed
    • SimetricDiference

      public int SimetricDiference(ScatterSearchV1.Subset subset, BitSet bitset)
      Calculate the Simetric Diference of two subsets
      返回:
      the Simetric Diference
      抛出:
      Exception - if the calculation can not be completed
    • filterSubset

      public List<ScatterSearchV1.Subset> filterSubset(List<ScatterSearchV1.Subset> subsetList, int preferredSize)
      Filter a given Lis of Subsets removing the equals subsets
      参数:
      subsetList - to filter
      preferredSize - the preferred size of the new List (if it is -1, then the filter is make it for all subsets, else then the filter method stops when the given preferred size is reached or all the subset have been filtered).
      返回:
      a new List filtered
      抛出:
      Exception - if the calculation can not be completed
    • printSubset

      public String printSubset(ScatterSearchV1.Subset subset)
    • attributeList

      public int[] attributeList(BitSet group)
      converts a BitSet into a list of attribute indexes
      参数:
      group - the BitSet to convert
      返回:
      an array of attribute indexes