A machine learning approach inspired by the human brain