class_docstr: Classifier wrapper of the StructureModel.
  Implements the sklearn .fit and .predict interface.
  
  Example:
  ::
      >>> from causalnex.sklearn import DAGRegressor
      >>>
      >>> clf = DAGClassifier(threshold=0.1)
      >>> clf.fit(X_train, y_train)
      >>>
      >>> y_preds = clf.predict(X_test)
      >>> type(y_preds)
      np.ndarray
      >>>
      >>> type(clf.feature_importances_)
      np.ndarray
  ::
  
  Attributes:
      feature_importances_ (np.ndarray): An array of edge weights corresponding
      positionally to the feature X.
  
      coef_ (np.ndarray): An array of edge weights corresponding
      positionally to the feature X.
  
      intercept_ (float): The target node bias value.
class_docstr_tok: ["Classifier","wrapper","of","the","StructureModel",".","Implements","the","sklearn",".fit","and",".predict","interface",".","Example",":",":",":",">",">",">","from","causalnex.sklearn","import","DAGRegressor",">",">",">",">",">",">","clf","=","DAGClassifier","(","threshold=0.1",")",">",">",">","clf.fit","(","X_train",",","y_train",")",">",">",">",">",">",">","y_preds","=","clf.predict","(","X_test",")",">",">",">","type","(","y_preds",")","np.ndarray",">",">",">",">",">",">","type","(","clf.feature_importances_",")","np.ndarray",":",":","Attributes",":","feature_importances_","(","np.ndarray",")",":","An","array","of","edge","weights","corresponding","positionally","to","the","feature","X.","coef_","(","np.ndarray",")",":","An","array","of","edge","weights","corresponding","positionally","to","the","feature","X.","intercept_","(","float",")",":","The","target","node","bias","value","."]
docstr: Returns:
      The bias term from the target node.
      shape: (1,) or (n_classes,).
docstr_tok: ["Returns",":","The","bias","term","from","the","target","node",".","shape",":","(","1",",",")","or","(","n_classes",",",")","."]
code: def intercept_(self) -> np.ndarray:
      """
      Returns:
          The bias term from the target node.
          shape: (1,) or (n_classes,).
      """
      n_classes = len(self.classes_)
      # handle binary
      if n_classes == 2:
          bias = self.graph_.nodes[self._target]["bias"]
          bias = 0.0 if bias is None else float(bias)
          return np.array([bias])
  
      # handle categorical
      biases = []
      for node in self._target_node_names:
          bias = self.graph_.nodes[node]["bias"]
          bias = 0.0 if bias is None else float(bias)
          biases.append(bias)
      return np.array(biases)
  
file_path: causalnex/causalnex/structure/pytorch/sklearn/clf.py
imports: from typing import List, Union
  import numpy
  import pandas
  from sklearn.base import ClassifierMixin
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils.multiclass import check_classification_targets
  from causalnex.structure.pytorch.dist_type.categorical import DistTypeCategorical
  from causalnex.structure.pytorch.sklearn._base import DAGBase
label_desc: Use image node_id 7 for calling the DAGClassifier obj's underlying member method code with example usage: obj.intercept_() and returns: np, np