def predict(self, X):
    check_is_fitted(self, ['X_', 'y_'])
    X = check_array(X)
    X = self.kbd_.transform(X)
    y = []
    for i in X[:, self.r_]:
        probRatio = self.class_selector[int(i)]
        selector = random()
        for i in range(len(probRatio)):
            if (selector <= probRatio[i]):
                y.append(self.classes_[i])
                break
    return y
def predict(self, X):
    check_is_fitted(self, ['X_', 'y_'])
    X = check_array(X)
    X = self.kbd_.transform(X)
    y = []
    for i in X[:, self.r_]:
        probRatio = self.class_selector[int(i)]
        selector = random()
        for i in range(len(probRatio)):
            if (selector <= probRatio[i]):
                y.append(self.classes_[i])
                break
    return y