For each training example, we have an input value x_train, for which a corresponding output, y, is known in advance. For each example, we find the difference between the known, correct value y, and our predicted value h(x_train)
ยกตัวอย่างเช่นการฝึกอบรมแต่ละครั้งเรามีค่าการป้อนข้อมูล x_train ซึ่งผลผลิตที่สอดคล้องกัน, y, เป็นที่รู้จักกันล่วงหน้า ยกตัวอย่างเช่นในแต่ละครั้งเราจะพบความแตกต่างระหว่างที่รู้จักกัน, y ค่าที่ถูกต้องและความคุ้มค่าที่คาดการณ์ของเรา h (x_train)