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: Method to initialize the `NaiveBayes` class.
  
  Parameters
  ----------
  feature_vars: list (array-like)
      A list of variable predictor variables (i.e. the features) in the model.
  
  dependent_var: hashable object
      The dependent variable (i.e. the variable to be predicted) in the model.
  
  Returns
  -------
  pgmpy.models.BayesianNetwork instance: An instance of a Bayesian Model with the
      initialized model structure.
docstr_tok: ["Method","to","initialize","the","`","NaiveBayes","`","class",".","Parameters","--","--","--","--","--","feature_vars",":","list","(","array-like",")","A","list","of","variable","predictor","variables","(","i.e",".","the","features",")","in","the","model",".","dependent_var",":","hashable","object","The","dependent","variable","(","i.e",".","the","variable","to","be","predicted",")","in","the","model",".","Returns","--","--","--","-","pgmpy.models.BayesianNetwork","instance",":","An","instance","of","a","Bayesian","Model","with","the","initialized","model","structure","."]
code: def __init__(self, feature_vars=None, dependent_var=None):
      """
      Method to initialize the `NaiveBayes` class.
  
      Parameters
      ----------
      feature_vars: list (array-like)
          A list of variable predictor variables (i.e. the features) in the model.
  
      dependent_var: hashable object
          The dependent variable (i.e. the variable to be predicted) in the model.
  
      Returns
      -------
      pgmpy.models.BayesianNetwork instance: An instance of a Bayesian Model with the
          initialized model structure.
      """
      self.dependent = dependent_var
      self.features = (
          set(feature_vars) if feature_vars is not None else set()
      )
      if (feature_vars is not None) and (dependent_var is not None):
          ebunch = [
              (self.dependent, feature) for feature in self.features
          ]
      else:
          ebunch = []
  
      super(NaiveBayes, self).__init__(ebunch=ebunch)
  
file_path: pgmpy/pgmpy/models/NaiveBayes.py
imports: from pgmpy.independencies import Independencies
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 1 to create a new NaiveBayes object from inherited base classes: BayesianNetwork with example: obj = NaiveBayes(feature_vars, dependent_var)