Back to Browse

Linear Regression Mathematics || Hindi || Lesson 9 || Machine Learning ||

2 views
Apr 22, 2026
6:29

In this video we discuss linear regression mathematics and understand mean squared error loss function derivation hindi 0:00 - Introduction loss function is the bed rock 0:35 - refresh previous concept of data set line equation prediction 1:37 - difficulty infinite lines to find patterns 2:05 subscribe 2:25 - mathematics of loss function 2:56 practical example to show loss calculation 4:35 - comparing best fit line 4:54 - moving to final mean squared error equation derivation Welcome back, Wisdomers! आज हम अपने सबसे पहले machine learning model: Linear Regression की mathematical foundations में गहराई से उतरेंगे। इस वीडियो में, हम Loss Function की derivation को explore करेंगे, एक ऐसा concept जो आपकी पूरी AI journey के लिए एक bedrock की तरह काम करता है। यह इस पहले section के सबसे critical lessons में से एक है। मैं आपको अंत तक focused रहने और इन fundamentals को master करने के लिए इस वीडियो को ज़रूरत पड़ने पर बार-बार देखने के लिए प्रोत्साहित करता हूँ। Shot2 Mathematics को और बेहतर तरीके से समझने के लिए, चलिए पिछले concepts को एक example के साथ refresh करते हैं। इस dataset को देखिए; इसमें एक input feature है, 'bill amount,' और एक output feature है, 'tip amount'। इस data को एक two-dimensional coordinate system में represent किया गया है। Shot3 एक machine learning model का goal यह है कि एक dataset में patterns को identify करने वाली एक line equation को ढूँढना। मान लीजिए कि हमारे model ने y = 0.18x + 0.2 वाली equation को identify किया है। अब हम इस line का उपयोग करके future data को predict कर सकते हैं। For example, अगर bill amount x = 7 है, तो उसे y = 0.18(x) + 0.2 वाली equation में substitute करने पर, हमें y = 1.46 मिलता है। Shot4 अब हम real challenge पर आते हैं। अगर आप graph को देखें, तो आप realize करेंगे कि हमारे data के patterns को capture करने वाली असल में infinite possible lines हो सकती हैं। चीज़ों को simple रखने के लिए, हमने यहाँ सिर्फ दो lines को highlight किया है। यह हमें machine learning के एक fundamental question पर ले आता है: इन सभी infinite possibilities में से, हम कैसे identify करें कि कौन सी line "best" है? Shot5 अपने dataset के लिए best line को identify करने के लिए, हमें एक mathematical approach अपनाना होगा। हम line of best fit को evaluate और finalize करने के लिए कुछ specific calculations का उपयोग करेंगे। इस काम के लिए इस्तेमाल होने वाला mathematical tool Loss Function के नाम से जाना जाता है। Artificial Intelligence के field में, Loss Function एक fundamental concept है, इसलिए please stay focused क्योंकि अब हम details में जाएंगे। Shot6 Loss Function के concept को सच में समझने के लिए, हम इसके formal equation को derive करने से पहले एक practical example देखेंगे। चलिए उन दो candidate lines पर वापस चलते हैं जिन्हें हमने पहले देखा था: y1 = 0.18x + 0.2 और y2 = 0.16x + 0.8। हमारे dataset के लिए इनमें से कौन सी line सबसे accurate fit है, यह तय करने के लिए अब हम कुछ ज़रूरी calculations करेंगे। Shot7 चलिए loss function calculations को step-by-step समझते हैं। हम शुरुआत करते हैं bill amount (x) और actual tip amount (y) के साथ। सबसे पहले, Equation 1 का इस्तेमाल करके, हम predicted values (y1) generate करते हैं। अपने dataset से bill amount को equation में substitute करने पर, हमें predicted value 2.0 मिलती है। इस prediction की accuracy जानने के लिए, हम Loss calculate करते हैं, जो कि predicted value और actual value के बीच का difference (y1 – y) है। फिर हम इस loss को square करते हैं ताकि negative signs हट जाएं और सभी loss values positive रहें। हर data point के लिए यही process repeat करने के बाद, हमें पता चलता है कि सभी squared loss values का final sum 0.80 है। Shot8 इसी तरह, हम second line equation के लिए भी यही process repeat करते हैं, जिससे हमें 1.20 का total loss मिलता है। दोनों lines के लिए total loss calculate करने के बाद, हम results को compare कर सकते हैं। चूंकि Line 1 में minimum loss मिलता है (1.20 के मुकाबले 0.80), इसे हमारे dataset के लिए 'line of best fit' के रूप में पहचाना जाता है। Shot9 Stay focused, Wisdomers! अब हम formal Loss Function equation और इसके graphical representation पर एक आखिरी नज़र डालेंगे। हमारी equation i=1 से n तक के summation के रूप में define की गई है, जो predicted value y ̂ और actual value y के बीच के squared difference को दिखाती है। यहाँ n हमारे dataset में data points की संख्या है। अगर आप graph को देखें, तो ये छोटी vertical segments observed data points और line पर मौजूद हमारे prediction data point के बीच की दूरी को दर्शाती हैं। जब हम 'Loss' की बात करते हैं, तो हमारा मतलब ठीक यही होता है। Shot10 एक आखिरी और बहुत ज़रूरी point: अगर हम सिर्फ total sum of squared errors का इस्तेमाल करते हैं। तो data points की संख्या बढ़ने के साथ-साथ loss value भी स्वाभाविक रूप से बढ़ेगी। यह सुनिश्चित करने के लिए कि हमारा loss metric सिर्फ sample size के बजाय average loss को दर्शाए। हम total को n से divide करके इस equation को normalize करते हैं। इससे हमें यह formula मिलता है: 1/n Σ (ŷi - yi)²। इसे ही हम Mean Squared Error या MSE कहते हैं, यानी Mean Squared Loss Function। हमारे अगले session में, हम इस equation और इसकी graphical properties की और गहरी समझ हासिल करेंगे।

Download

0 formats

No download links available.

Linear Regression Mathematics || Hindi || Lesson 9 || Machine Learning || | NatokHD