Distributed algorithm for pattern classification and prediction of big data by using machine learning techniques