Unsupervised Learning Loss Function Definition