(self, X, Y, W, domain)
return default_rule
Generate a default rule, which mimics a majority classifier.
        Specific to each individual rule inducer, the application of the
        default rule varies. To predict an instance, a single default
        rule should be considered.

        Parameters
        ----------
        X, Y, W : ndarray
            Learning data.
        domain : Orange.data.domain.Domain
            Data domain, used to calculate class distributions.

        Returns
        -------
        default_rule : Rule
            Default rule with no selectors that covers all learning
            instances and mimics a majority classifier.
Generate a default rule, which mimics a majority classifier.
        Specific to each individual rule inducer, the application of the
        default rule varies. To predict an instance, a single default
        rule should be considered.
Generate a default rule which mimics a majority classifier . Specific to each individual rule inducer the application of the default rule varies . To predict an instance a single default rule should be considered .
def generate_default_rule(self, X, Y, W, domain):
        """
        Generate a default rule, which mimics a majority classifier.
        Specific to each individual rule inducer, the application of the
        default rule varies. To predict an instance, a single default
        rule should be considered.

        Parameters
        ----------
        X, Y, W : ndarray
            Learning data.
        domain : Orange.data.domain.Domain
            Data domain, used to calculate class distributions.

        Returns
        -------
        default_rule : Rule
            Default rule with no selectors that covers all learning
            instances and mimics a majority classifier.
        """
        rf = self.rule_finder
        dist = get_dist(Y, W, domain)

        default_rule = Rule(None, None, domain, dist, dist,
                            rf.quality_evaluator, rf.complexity_evaluator,
                            rf.significance_validator, rf.general_validator)

        default_rule.filter_and_store(X, Y, W, None)
        default_rule.do_evaluate()
        default_rule.create_model()
        return default_rule
def generate_default_rule ( self , X , Y , W , domain ) : rf = self . rule_finder dist = get_dist ( Y , W , domain ) default_rule = Rule ( None , None , domain , dist , dist , rf . quality_evaluator , rf . complexity_evaluator , rf . significance_validator , rf . general_validator ) default_rule . filter_and_store ( X , Y , W , None ) default_rule . do_evaluate ( ) default_rule . create_model ( ) return default_rule