类 LocalScoreSearchAlgorithm

java.lang.Object
weka.classifiers.bayes.net.search.SearchAlgorithm
weka.classifiers.bayes.net.search.local.LocalScoreSearchAlgorithm
所有已实现的接口:
Serializable, OptionHandler, RevisionHandler
直接已知子类:
CISearchAlgorithm, GeneticSearch, HillClimber, K2, SimulatedAnnealing, TAN

public class LocalScoreSearchAlgorithm extends SearchAlgorithm
The ScoreBasedSearchAlgorithm class supports Bayes net structure search algorithms that are based on maximizing scores (as opposed to for example conditional independence based search algorithms).

Valid options are:

 -mbc
  Applies a Markov Blanket correction to the network structure, 
  after a network structure is learned. This ensures that all 
  nodes in the network are part of the Markov blanket of the 
  classifier node.
 -S [BAYES|MDL|ENTROPY|AIC|CROSS_CLASSIC|CROSS_BAYES]
  Score type (BAYES, BDeu, MDL, ENTROPY and AIC)
版本:
$Revision: 5196 $
作者:
Remco Bouckaert
另请参阅:
  • 字段详细资料

    • TAGS_SCORE_TYPE

      public static final Tag[] TAGS_SCORE_TYPE
      the score types
  • 构造器详细资料

    • LocalScoreSearchAlgorithm

      public LocalScoreSearchAlgorithm()
      default constructor
    • LocalScoreSearchAlgorithm

      public LocalScoreSearchAlgorithm(BayesNet bayesNet, Instances instances)
      constructor
      参数:
      bayesNet - the network
      instances - the data
  • 方法详细资料

    • logScore

      public double logScore(int nType)
      logScore returns the log of the quality of a network (e.g. the posterior probability of the network, or the MDL value).
      参数:
      nType - score type (Bayes, MDL, etc) to calculate score with
      返回:
      log score.
    • buildStructure

      public void buildStructure(BayesNet bayesNet, Instances instances) throws Exception
      buildStructure determines the network structure/graph of the network with the K2 algorithm, restricted by its initial structure (which can be an empty graph, or a Naive Bayes graph.
      覆盖:
      buildStructure 在类中 SearchAlgorithm
      参数:
      bayesNet - the network
      instances - the data to use
      抛出:
      Exception - if something goes wrong
    • calcNodeScore

      public double calcNodeScore(int nNode)
      Calc Node Score for given parent set
      参数:
      nNode - node for which the score is calculate
      返回:
      log score
    • calcScoreWithExtraParent

      public double calcScoreWithExtraParent(int nNode, int nCandidateParent)
      Calc Node Score With AddedParent
      参数:
      nNode - node for which the score is calculate
      nCandidateParent - candidate parent to add to the existing parent set
      返回:
      log score
    • calcScoreWithMissingParent

      public double calcScoreWithMissingParent(int nNode, int nCandidateParent)
      Calc Node Score With Parent Deleted
      参数:
      nNode - node for which the score is calculate
      nCandidateParent - candidate parent to delete from the existing parent set
      返回:
      log score
    • setScoreType

      public void setScoreType(SelectedTag newScoreType)
      set quality measure to be used in searching for networks.
      参数:
      newScoreType - the new score type
    • getScoreType

      public SelectedTag getScoreType()
      get quality measure to be used in searching for networks.
      返回:
      quality measure
    • setMarkovBlanketClassifier

      public void setMarkovBlanketClassifier(boolean bMarkovBlanketClassifier)
      参数:
      bMarkovBlanketClassifier -
    • getMarkovBlanketClassifier

      public boolean getMarkovBlanketClassifier()
      返回:
    • listOptions

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

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

      Valid options are:

       -mbc
        Applies a Markov Blanket correction to the network structure, 
        after a network structure is learned. This ensures that all 
        nodes in the network are part of the Markov blanket of the 
        classifier node.
       -S [BAYES|MDL|ENTROPY|AIC|CROSS_CLASSIC|CROSS_BAYES]
        Score type (BAYES, BDeu, MDL, ENTROPY and AIC)
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 SearchAlgorithm
      参数:
      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 the search algorithm.
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 SearchAlgorithm
      返回:
      an array of strings suitable for passing to setOptions
    • scoreTypeTipText

      public String scoreTypeTipText()
      返回:
      a string to describe the ScoreType option.
    • markovBlanketClassifierTipText

      public String markovBlanketClassifierTipText()
      返回:
      a string to describe the MarkovBlanketClassifier option.
    • globalInfo

      public String globalInfo()
      This will return a string describing the search algorithm.
      返回:
      The string.
    • getRevision

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