Machine learning library and applications