'Predict probability for each possible outcome.
Compute the probability estimates for each single sample in X
and each possible outcome seen during training (categorical
distribution).
Parameters
X : array_like, shape = [n_samples, n_features]
Returns
probabilities : array, shape = [n_samples, n_classes]
Normalized probability distributions across
class labels'

def predict_proba(self, X):

    check_is_fitted(self, 'X_')
    X_2d = check_array(X, accept_sparse=['csc', 'csr', 'coo', 'dok', 'bsr', 'lil', 'dia'])
    weight_matrices = self._get_kernel(self.X_, X_2d)
    if (self.kernel == 'knn'):
        probabilities = []
        for weight_matrix in weight_matrices:
            ine = np.sum(self.label_distributions_[weight_matrix], axis=0)
            probabilities.append(ine)
        probabilities = np.array(probabilities)
    else:
        weight_matrices = weight_matrices.T
        probabilities = np.dot(weight_matrices, self.label_distributions_)
    normalizer = np.atleast_2d(np.sum(probabilities, axis=1)).T
    probabilities /= normalizer
    return probabilities
