def METHOD_NAME(self):
    S = 0
    for f_k, w in zip(self._f.reshape(len(self._weights), -1), self._weights):
        _f = np.extract((f_k > 1e-12) * (f_k < 1 - 1e-12), f_k)
        S -= (_f * np.log(_f) + (1 - _f) * np.log(1 - _f)).sum() * w
    return S * self._g * self._T / self._weights.sum()