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: Uses the fitted NOTEARS algorithm to reconstruct y from known X data.
  
  Returns:
      Predicted y class probabilities for each row of X.
docstr_tok: ["Uses","the","fitted","NOTEARS","algorithm","to","reconstruct","y","from","known","X","data",".","Returns",":","Predicted","y","class","probabilities","for","each","row","of","X","."]
code: def predict_proba(
      self, X: Union[pd.DataFrame, np.ndarray]
  ) -> np.ndarray:
      """
      Uses the fitted NOTEARS algorithm to reconstruct y from known X data.
  
      Returns:
          Predicted y class probabilities for each row of X.
      """
      y_pred = super().predict(X)
      # binary predict returns a (n_samples,) array
      # sklearn interface requires (n_samples, n_classes)
      if len(y_pred.shape) == 1:
          y_pred = np.vstack([1 - y_pred, y_pred]).T
      return y_pred
  
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 3 for calling the DAGClassifier obj's underlying member method code with example usage: obj.predict_proba(X) and returns: y_pred