(self, X)
return self.y_[closest]
A reference implementation of a prediction for a classifier.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            The input samples.

        Returns
        -------
        y : ndarray, shape (n_samples,)
            The label for each sample is the label of the closest sample
            seen during fit.
A reference implementation of a prediction for a classifier.
A reference implementation of a prediction for a classifier .
def predict(self, X):
        """ A reference implementation of a prediction for a classifier.

        Parameters
        ----------
        X : array-like, shape (n_samples, n_features)
            The input samples.

        Returns
        -------
        y : ndarray, shape (n_samples,)
            The label for each sample is the label of the closest sample
            seen during fit.
        """
        # Check is fit had been called
        check_is_fitted(self, ['X_', 'y_'])

        # Input validation
        X = check_array(X)

        closest = np.argmin(euclidean_distances(X, self.X_), axis=1)
        return self.y_[closest]
def predict ( self , X ) : # Check is fit had been called check_is_fitted ( self , [ 'X_' , 'y_' ] ) # Input validation X = check_array ( X ) closest = np . argmin ( euclidean_distances ( X , self . X_ ) , axis = 1 ) return self . y_ [ closest ]