Network classification through random walks