Compress data according to trained replicator or autoencoder.
Outputs are the activations of the nodes in the middle layer for each
observation in newdata
encode(object, newdata, returnInputs = FALSE)
Object of class ANN
Data to compress
Logical indicating whether the inputs to the compression layer should be returned. Mainly used for plotting the activations.