Similarity Encoder (SimEc) Neural Network Framework for learning low dimensional similarity preserving representations