Integrating blockchain with machine learning