(self)
This function sets the initial target class probability prior value
        based on the input data.
This function sets the initial target class probability prior value
        based on the input data.
This function sets the initial target class probability prior value based on the input data .
def _set_target_prior(self):
        """
        This function sets the initial target class probability prior value
        based on the input data.
        """
        if self.results.data:
            # here we can use target_index directly since values in the
            # dropdown are sorted in same order than values in the table
            target_values_cnt = np.count_nonzero(
                self.results.data.Y == self.target_index)
            count_all = np.count_nonzero(~np.isnan(self.results.data.Y))
            self.target_prior = np.round(target_values_cnt / count_all * 100)

            # set the spin text to gray color when set automatically
            self.target_prior_sp.setStyleSheet("color: gray;")
def _set_target_prior ( self ) : if self . results . data : # here we can use target_index directly since values in the # dropdown are sorted in same order than values in the table target_values_cnt = np . count_nonzero ( self . results . data . Y == self . target_index ) count_all = np . count_nonzero ( ~ np . isnan ( self . results . data . Y ) ) self . target_prior = np . round ( target_values_cnt / count_all * 100 ) # set the spin text to gray color when set automatically self . target_prior_sp . setStyleSheet ( "color: gray;" )