class_docstr: Class to represent Naive Bayes. Naive Bayes is a special case of Bayesian Model
  where the only edges in the model are from the feature variables to the dependent variable.
class_docstr_tok: ["Class","to","represent","Naive","Bayes",".","Naive","Bayes","is","a","special","case","of","Bayesian","Model","where","the","only","edges","in","the","model","are","from","the","feature","variables","to","the","dependent","variable","."]
docstr: Returns all the nodes reachable from start via an active trail.
  
  Parameters
  ----------
  start: Graph node
  
  observed : List of nodes (optional)
      If given the active trail would be computed assuming these nodes to be observed.
  
  Examples
  --------
  >>> from pgmpy.models import NaiveBayes
  >>> model = NaiveBayes()
  >>> model.add_nodes_from(['a', 'b', 'c', 'd'])
  >>> model.add_edges_from([('a', 'b'), ('a', 'c'), ('a', 'd')])
  >>> model.active_trail_nodes('a')
  {'a', 'd', 'c', 'b'}
  >>> model.active_trail_nodes('a', ['b', 'c'])
  {'a', 'd'}
  >>> model.active_trail_nodes('b', ['a'])
  {'b'}
docstr_tok: ["Returns","all","the","nodes","reachable","from","start","via","an","active","trail",".","Parameters","--","--","--","--","--","start",":","Graph","node","observed",":","List","of","nodes","(","optional",")","If","given","the","active","trail","would","be","computed","assuming","these","nodes","to","be","observed",".","Examples","--","--","--","--",">",">",">","from","pgmpy.models","import","NaiveBayes",">",">",">","model","=","NaiveBayes","(",")",">",">",">","model.add_nodes_from","(","[","'","a","'",",","'","b","'",",","'","c","'",",","'d","'","]",")",">",">",">","model.add_edges_from","(","[","(","'","a","'",",","'","b","'",")",",","(","'","a","'",",","'","c","'",")",",","(","'","a","'",",","'d","'",")","]",")",">",">",">","model.active_trail_nodes","(","'","a","'",")","{","'","a","'",",","'d","'",",","'","c","'",",","'","b","'","}",">",">",">","model.active_trail_nodes","(","'","a","'",",","[","'","b","'",",","'","c","'","]",")","{","'","a","'",",","'d","'","}",">",">",">","model.active_trail_nodes","(","'","b","'",",","[","'","a","'","]",")","{","'","b","'","}"]
code: def active_trail_nodes(self, start, observed=None):
      """
      Returns all the nodes reachable from start via an active trail.
  
      Parameters
      ----------
      start: Graph node
  
      observed : List of nodes (optional)
          If given the active trail would be computed assuming these nodes to be observed.
  
      Examples
      --------
      >>> from pgmpy.models import NaiveBayes
      >>> model = NaiveBayes()
      >>> model.add_nodes_from(['a', 'b', 'c', 'd'])
      >>> model.add_edges_from([('a', 'b'), ('a', 'c'), ('a', 'd')])
      >>> model.active_trail_nodes('a')
      {'a', 'd', 'c', 'b'}
      >>> model.active_trail_nodes('a', ['b', 'c'])
      {'a', 'd'}
      >>> model.active_trail_nodes('b', ['a'])
      {'b'}
      """
  
      if observed and self.dependent in observed:
          return set(start)
      else:
          return set(self.nodes()) - set(observed if observed else [])
  
file_path: pgmpy/pgmpy/models/NaiveBayes.py
imports: from pgmpy.independencies import Independencies
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 5 for calling the NaiveBayes obj's underlying member method code with example usage: obj.active_trail_nodes(start, observed) and returns: set, unknown