(self, oracle_history, majority_vote_result, alpha=0.05)
return uia
Calculate the UI(a) by providing the labeling history and the majority vote results.

        Parameters
        ----------
        oracle_history: dict
            The labeling history of an oracle. The key is the index of instance, the value is the
            label given by the oracle.

        majority_vote_result: dict
            The results of majority vote of instances. The key is the index of instance,
            the value is the label given by the oracle.

        alpha: float, optional (default=0.05)
            Used for calculating the critical value for the Student’s t-distribution with n−1
            degrees of freedom at the alpha/2 confidence level.

        Returns
        -------
        uia: float
            The UI(a) value.
Calculate the UI(a) by providing the labeling history and the majority vote results.
Calculate the UI ( a ) by providing the labeling history and the majority vote results .
def _calc_uia(self, oracle_history, majority_vote_result, alpha=0.05):
        """Calculate the UI(a) by providing the labeling history and the majority vote results.

        Parameters
        ----------
        oracle_history: dict
            The labeling history of an oracle. The key is the index of instance, the value is the
            label given by the oracle.

        majority_vote_result: dict
            The results of majority vote of instances. The key is the index of instance,
            the value is the label given by the oracle.

        alpha: float, optional (default=0.05)
            Used for calculating the critical value for the Student’s t-distribution with n−1
            degrees of freedom at the alpha/2 confidence level.

        Returns
        -------
        uia: float
            The UI(a) value.
        """
        n = len(self._oracles_iterset)
        t_crit_val = scipy.stats.t.isf([alpha / 2], n - 1)[0]
        reward_arr = []
        for ind in oracle_history.keys():
            if oracle_history[ind] == majority_vote_result[ind]:
                reward_arr.append(1)
            else:
                reward_arr.append(0)
        mean_a = np.mean(reward_arr)
        std_a = np.std(reward_arr)
        uia = mean_a + t_crit_val * std_a / np.sqrt(n)
        return uia
def _calc_uia ( self , oracle_history , majority_vote_result , alpha = 0.05 ) : n = len ( self . _oracles_iterset ) t_crit_val = scipy . stats . t . isf ( [ alpha / 2 ] , n - 1 ) [ 0 ] reward_arr = [ ] for ind in oracle_history . keys ( ) : if oracle_history [ ind ] == majority_vote_result [ ind ] : reward_arr . append ( 1 ) else : reward_arr . append ( 0 ) mean_a = np . mean ( reward_arr ) std_a = np . std ( reward_arr ) uia = mean_a + t_crit_val * std_a / np . sqrt ( n ) return uia