<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def predict(self, y_prob):
 """ Calculate the prediction using the ThresholdingOptimization. Parameters y_prob : array-like of shape = [n_samples, 2] Predicted probabilities. Returns ------- y_pred : array-like of shape = [n_samples] Predicted class """

        y_pred = np.floor(y_prob[:, 1] + (1 - self.threshold_))

        return y_pred