ds[list(positive_cases)] = 1

        return preds

    def _get_design_matrices(self, X, y, rule):
        &#34;&#34;&#34; produce design matrices used in most equations&#34;&#34;&#34;
        preds = self._rule_predict(X, rule)

        W_plus_idx = np.where((preds == 1) &amp; (y == 1))
        W_minus_idx = np.where((preds == 1) &amp; (y == 0))

        return np.sum(self.D[W_plus_idx]), np.sum(self.D[W_minus_idx])

    def _grow_rule_obj(self, X, y, rule):
        &#34;&#34;&#34; equation to maximize in