machine learning class coding by using js