Using Machine Learning to Identify Functional Properties of Complex Systems: from Neurons to Networks