class_docstr: Class for heuristic hill climb searches for DAGs, to learn
  network structure from data. `estimate` attempts to find a model with optimal score.
  
  Parameters
  ----------
  data: pandas DataFrame object
      dataframe object where each column represents one variable.
      (If some values in the data are missing the data cells should be set to `numpy.NaN`.
      Note that pandas converts each column containing `numpy.NaN`s to dtype `float`.)
  
  state_names: dict (optional)
      A dict indicating, for each variable, the discrete set of states (or values)
      that the variable can take. If unspecified, the observed values in the data set
      are taken to be the only possible states.
  
  use_caching: boolean
      If True, uses caching of score for faster computation.
      Note: Caching only works for scoring methods which are decomposable. Can
      give wrong results in case of custom scoring methods.
  
  References
  ----------
  Koller & Friedman, Probabilistic Graphical Models - Principles and Techniques, 2009
  Section 18.4.3 (page 811ff)
class_docstr_tok: ["Class","for","heuristic","hill","climb","searches","for","DAGs",",","to","learn","network","structure","from","data",".","`","estimate","`","attempts","to","find","a","model","with","optimal","score",".","Parameters","--","--","--","--","--","data",":","pandas","DataFrame","object","dataframe","object","where","each","column","represents","one","variable",".","(","If","some","values","in","the","data","are","missing","the","data","cells","should","be","set","to","`","numpy.NaN","`",".","Note","that","pandas","converts","each","column","containing","`","numpy.NaN","`","s","to","dtype","`","float","`",".",")","state_names",":","dict","(","optional",")","A","dict","indicating",",","for","each","variable",",","the","discrete","set","of","states","(","or","values",")","that","the","variable","can","take",".","If","unspecified",",","the","observed","values","in","the","data","set","are","taken","to","be","the","only","possible","states",".","use_caching",":","boolean","If","True",",","uses","caching","of","score","for","faster","computation",".","Note",":","Caching","only","works","for","scoring","methods","which","are","decomposable",".","Can","give","wrong","results","in","case","of","custom","scoring","methods",".","References","--","--","--","--","--","Koller","&","Friedman",",","Probabilistic","Graphical","Models","-","Principles","and","Techniques",",","2009","Section","18.4.3","(","page","811ff",")"]
code: def __init__(self, data, use_cache=True, **kwargs):
      self.use_cache = use_cache
  
      super(HillClimbSearch, self).__init__(data, **kwargs)
  
file_path: pgmpy/pgmpy/estimators/HillClimbSearch.py
imports: from collections import deque
  from itertools import permutations
  import networkx
  from tqdm.auto import trange
  from pgmpy import config
  from pgmpy.base import DAG
  from pgmpy.estimators import AICScore, BDeuScore, BDsScore, BicScore, K2Score, ScoreCache, StructureEstimator, StructureScore
label_desc: Use image node_id 1 to create a new HillClimbSearch object from inherited base classes: StructureEstimator with example: obj = HillClimbSearch(data, use_cache)