NeuralNetwork.predict#

usencrypt.ai.nn.NeuralNetwork.predict(self, X, batch_size=32, _internal=False)#

Uses the neural network model to generate predictions based on an input of samples.

This function assumes the data X is of shape (m, n), where m is the number of examples and n is the number of features. Further, it also assumes the labels y are represented by a one-hot encoded matrix of shape (m, c), where c is the number of classes.

Parameters
  • X (list or numpy.ndarray of float or usencrypt.cipher.Float) – The input features.

  • batch_size (int) – The number of samples per batch. Defaults to 32.

Returns

An array of predictions.

Return type

numpy.ndarray of float or usencrypt.cipher.Float

Examples

For examples on how to work with the neural network model, please refer to our corresponding tutorials.