def accuracy_curve(self, delta_tau=0.01):
        """ Computes the relationship between probability threshold
        and classification accuracy. """
        # compute thresholds based on the sorted probabilities
        orig_thresh = self.threshold
        sorted_labels, sorted_probs = self.sorted_values

        scores = []
        taus = []
        tau = 0
        for k in range(len(sorted_labels)):
            # compute new accuracy
            self.threshold = tau
            scores.append(self.accuracy)
            taus.append(tau)

            # update threshold
            tau = sorted_probs[k]

        # add last datapoint
        tau = 1.0
        self.threshold = tau
        scores.append(self.accuracy)
        taus.append(tau)

        self.threshold = orig_thresh
        return scores, taus
def accuracy_curve ( self , delta_tau = 0.01 ) : orig_thresh = self . threshold sorted_labels , sorted_probs = self . sorted_values scores = [ ] taus = [ ] tau = 0 for k in range ( len ( sorted_labels ) ) : self . threshold = tau scores . append ( self . accuracy ) taus . append ( tau ) tau = sorted_probs [ k ] tau = 1.0 self . threshold = tau scores . append ( self . accuracy ) taus . append ( tau ) self . threshold = orig_thresh return scores , taus
Computes the relationship between probability threshold
        and classification accuracy.