Optics Algorithm In Machine Learning