'Predict using the trained model
Parameters
X : {array-like, sparse matrix}, shape (n_samples, n_features)
The input data.
Returns
y_pred : array-like, shape (n_samples,) or (n_samples, n_outputs)
The decision function of the samples for each class in the model.'

def _predict(self, X):

    X = check_array(X, accept_sparse=['csr', 'csc', 'coo'])
    hidden_layer_sizes = self.hidden_layer_sizes
    if (not hasattr(hidden_layer_sizes, '__iter__')):
        hidden_layer_sizes = [hidden_layer_sizes]
    hidden_layer_sizes = list(hidden_layer_sizes)
    layer_units = (([X.shape[1]] + hidden_layer_sizes) + [self.n_outputs_])
    activations = [X]
    for i in range((self.n_layers_ - 1)):
        activations.append(np.empty((X.shape[0], layer_units[(i + 1)])))
    self._forward_pass(activations)
    y_pred = activations[(-1)]
    return y_pred
