<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_proba(self, features):
 """Use the optimized pipeline to estimate the class probabilities for a feature set. Parameters features: array-like {n_samples, n_features} Feature matrix of the testing set Returns ------- array-like: {n_samples, n_target} The class probabilities of the input samples """

        if not self.fitted_pipeline_:
            raise RuntimeError('A pipeline has not yet been optimized. Please call fit() first.')
        else:
            if not (hasattr(self.fitted_pipeline_, 'predict_proba')):
                raise RuntimeError('The fitted pipeline does not have the predict_proba() function.')

            features = self._check_dataset(features, target=None, sample_weight=None)

            return self.fitted_pipeline_.predict_proba(features)