結果 : python optimize cost function