(self)
return same, min(effective_cost), method_cost
Check if the total cost is the same for all folds.

        Returns
        -------
        same: bool
            If the total cost for all folds are the same.

        effective_cost: float
            If the total cost are the same, return the total cost.
            Otherwise, return the min value of total cost for all folds.

        method_cost: dict
            The effective cost for all methods.
Check if the total cost is the same for all folds.
Check if the total cost is the same for all folds .
def _check_and_get_total_cost(self):
        """Check if the total cost is the same for all folds.

        Returns
        -------
        same: bool
            If the total cost for all folds are the same.

        effective_cost: float
            If the total cost are the same, return the total cost.
            Otherwise, return the min value of total cost for all folds.

        method_cost: dict
            The effective cost for all methods.
        """
        # return value initialize
        effective_cost = set()
        method_cost = dict()

        # gathering information
        for method_name in self._data_extracted.keys():
            total_cost_folds = []
            for fold in self._data_extracted[method_name]:
                total_cost_fold = [np.sum(query_info[0]) for query_info in fold]
                total_cost_folds.append(np.sum(total_cost_fold))

            method_unique_cost = np.unique(total_cost_folds)
            effective_cost.update(set(method_unique_cost))
            method_cost[method_name] = method_unique_cost
        # return
        same = True if len(effective_cost) == 1 else False
        return same, min(effective_cost), method_cost
def _check_and_get_total_cost ( self ) : # return value initialize effective_cost = set ( ) method_cost = dict ( ) # gathering information for method_name in self . _data_extracted . keys ( ) : total_cost_folds = [ ] for fold in self . _data_extracted [ method_name ] : total_cost_fold = [ np . sum ( query_info [ 0 ] ) for query_info in fold ] total_cost_folds . append ( np . sum ( total_cost_fold ) ) method_unique_cost = np . unique ( total_cost_folds ) effective_cost . update ( set ( method_unique_cost ) ) method_cost [ method_name ] = method_unique_cost # return same = True if len ( effective_cost ) == 1 else False return same , min ( effective_cost ) , method_cost