class_docstr: An estimator that supports building rules as described in
  A Simple, Fast, and Effective Rule Learner (1999). Intended to be used
  as part of the SlipperRulesClassifier.
class_docstr_tok: ["An","estimator","that","supports","building","rules","as","described","in","A","Simple",",","Fast",",","and","Effective","Rule","Learner","(","1999",")",".","Intended","to","be","used","as","part","of","the","SlipperRulesClassifier","."]
docstr: produce design matrices used in most equations
docstr_tok: ["produce","design","matrices","used","in","most","equations"]
code: def _get_design_matrices(self, X, y, rule):
      """produce design matrices used in most equations"""
      preds = self._rule_predict(X, rule)
  
      W_plus_idx = np.where((preds == 1) & (y == 1))
      W_minus_idx = np.where((preds == 1) & (y == 0))
  
      return np.sum(self.D[W_plus_idx]), np.sum(self.D[W_minus_idx])
  
imports: import random
  import numpy
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.model_selection import train_test_split
  from imodels.util.arguments import check_fit_arguments
label_desc: Use image node_id 5 for calling the SlipperBaseEstimator obj's underlying member method code with example usage: obj._get_design_matrices(X, y, rule) and returns: np,  np