Autoencoders or neural networks for dimensionality reduction