title
Tutorial 26- Linear Regression Indepth Maths Intuition- Data Science
description
Please join as a member in my channel to get additional benefits like materials in Data Science, live streaming for Members and many more
https://www.youtube.com/channel/UCNU_lfiiWBdtULKOw6X0Dig/join
Connect with me here:
Twitter: https://twitter.com/Krishnaik06
Facebook: https://www.facebook.com/krishnaik06
instagram: https://www.instagram.com/krishnaik06
detail
{'title': 'Tutorial 26- Linear Regression Indepth Maths Intuition- Data Science', 'heatmap': [{'end': 233.947, 'start': 187.718, 'weight': 0.74}, {'end': 364.201, 'start': 277.051, 'weight': 0.812}, {'end': 759.528, 'start': 710.142, 'weight': 0.808}, {'end': 920.195, 'start': 857.091, 'weight': 0.746}, {'end': 1076.872, 'start': 1015.164, 'weight': 0.786}, {'end': 1149.857, 'start': 1102.582, 'weight': 0.702}, {'end': 1359.912, 'start': 1320.204, 'weight': 0.747}], 'summary': 'Tutorial explores the mathematics behind regression, emphasizing the equations y=mx+c and the importance of slope and intercept for optimal fit line, covers best fit line equation, cost function, linear regression, cost function analysis, gradient descent, convergence theorem, learning rate, derivatives, and the significance of a small learning rate and convergence theorem in reaching the global minimum point in linear regression.', 'chapters': [{'end': 45.355, 'segs': [{'end': 45.355, 'src': 'embed', 'start': 0.289, 'weight': 0, 'content': [{'end': 5.893, 'text': 'Hello all, today we will be discussing about the maths intuition behind a regression problem statement.', 'start': 0.289, 'duration': 5.604}, {'end': 14.418, 'text': 'In my previous videos I have already shown a lot of practical application and examples with respect to simple linear regression and multiple linear regression.', 'start': 6.994, 'duration': 7.424}, {'end': 22.464, 'text': 'But in this particular video, I am going to describe or discuss about the detailed explanation on the maths of the regression part.', 'start': 14.899, 'duration': 7.565}, {'end': 29.427, 'text': 'so everybody remembers that the re, the linear regression or the simple linear regression or multiple linear regression,', 'start': 22.964, 'duration': 6.463}, {'end': 31.468, 'text': 'is basically given by the equation.', 'start': 29.427, 'duration': 2.041}, {'end': 35.69, 'text': 'y is equal to mx plus c, and this is basically my best fit line.', 'start': 31.468, 'duration': 4.222}, {'end': 40.553, 'text': 'by using this equation, i actually try to find out the best fit line over here.', 'start': 35.69, 'duration': 4.863}, {'end': 45.355, 'text': 'my m is basically the slope right and c is basically the intercept.', 'start': 40.553, 'duration': 4.802}], 'summary': 'Discussing the mathematical intuition behind regression, including the equation y=mx+c and practical applications.', 'duration': 45.066, 'max_score': 0.289, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s289.jpg'}], 'start': 0.289, 'title': 'Maths intuition for regression', 'summary': 'Delves into the mathematics behind regression, emphasizing the equations y=mx+c and the importance of m as the slope and c as the intercept in determining the optimal fit line.', 'chapters': [{'end': 45.355, 'start': 0.289, 'title': 'Maths intuition for regression', 'summary': 'Discusses the mathematics behind regression, focusing on the equations y=mx+c and the significance of m as the slope and c as the intercept in finding the best fit line.', 'duration': 45.066, 'highlights': ['The equation for linear regression, y=mx+c, represents the best fit line where m is the slope and c is the intercept.', 'The video aims to provide a detailed explanation of the mathematical aspects of regression.']}], 'duration': 45.066, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s289.jpg', 'highlights': ['The equation for linear regression, y=mx+c, represents the best fit line where m is the slope and c is the intercept.', 'The video aims to provide a detailed explanation of the mathematical aspects of regression.']}, {'end': 412.123, 'segs': [{'end': 105.652, 'src': 'embed', 'start': 69.473, 'weight': 0, 'content': [{'end': 78.881, 'text': "is basically that we'll try to create a best-fit line, Such that this best-fit line, what you know it, will indicate that for my future size Suppose,", 'start': 69.473, 'duration': 9.408}, {'end': 82.983, 'text': 'for this particular size, I want to find out what may be the price of the particular house.', 'start': 78.881, 'duration': 4.102}, {'end': 92.807, 'text': "Then what I can do is that I can actually point to this particular point over here and I can find out the price value and I'll be able to determine the price with the help of this best fit line.", 'start': 83.023, 'duration': 9.784}, {'end': 93.967, 'text': 'So this is my best fit line.', 'start': 92.827, 'duration': 1.14}, {'end': 100.37, 'text': 'And as discussed, this best fit line is basically indicated by the equation Y is equal to MX plus C.', 'start': 94.467, 'duration': 5.903}, {'end': 105.652, 'text': 'Now, what does this component mean? That is my M value and my C value.', 'start': 100.37, 'duration': 5.282}], 'summary': 'Creating a best-fit line to determine future house prices using the equation y=mx+c.', 'duration': 36.179, 'max_score': 69.473, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s69473.jpg'}, {'end': 233.947, 'src': 'heatmap', 'start': 187.718, 'weight': 0.74, 'content': [{'end': 191.381, 'text': 'what is the change in your best fit value?', 'start': 187.718, 'duration': 3.663}, {'end': 195.265, 'text': 'what is the change of the price that we are actually considering it as a slope?', 'start': 191.381, 'duration': 3.884}, {'end': 205.332, 'text': 'so this particular slope is basically indicating that with the unit change in my x-axis, that means my size what will be the change in your y-axis?', 'start': 195.965, 'duration': 9.367}, {'end': 207.914, 'text': 'you know, and that is what we are trying to find out now.', 'start': 205.332, 'duration': 2.582}, {'end': 213.715, 'text': 'Now, the other way that you may be thinking that how can we think of a best fit line?', 'start': 209.232, 'duration': 4.483}, {'end': 218.678, 'text': 'you know, in this particular equation, see, one way is that I can draw multiple best fit line.', 'start': 213.715, 'duration': 4.963}, {'end': 220.459, 'text': 'you know multiple best fit line like this.', 'start': 218.678, 'duration': 1.781}, {'end': 225.842, 'text': 'And what I should try to do is that I should try to minimize this distance.', 'start': 221.019, 'duration': 4.823}, {'end': 233.947, 'text': 'you know, minimize this particular distance or this particular error, such that if I do the summation of all the error, it should be minimal.', 'start': 225.842, 'duration': 8.105}], 'summary': 'Analyzing best fit value change in relation to price slope and minimizing overall error.', 'duration': 46.229, 'max_score': 187.718, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s187718.jpg'}, {'end': 370.165, 'src': 'heatmap', 'start': 269.167, 'weight': 2, 'content': [{'end': 275.812, 'text': 'suppose my x is basically my size and y is basically my price, and i have a lot of points that is getting populated, you know.', 'start': 269.167, 'duration': 6.645}, {'end': 280.672, 'text': 'Now, from this I found out that best fit line is this one.', 'start': 277.051, 'duration': 3.621}, {'end': 287.534, 'text': 'Now what we should consider while selecting the best fit line, I will define a function which is called as cost function.', 'start': 281.212, 'duration': 6.322}, {'end': 290.235, 'text': 'Again guys, this cost function is very, very important.', 'start': 288.135, 'duration': 2.1}, {'end': 296.217, 'text': "This cost function is also a basic thing that we'll also be learning in deep learning.", 'start': 290.595, 'duration': 5.622}, {'end': 298.058, 'text': 'So it is very important to understand this.', 'start': 296.497, 'duration': 1.561}, {'end': 301.059, 'text': 'So make sure that you watch this particular video till the end.', 'start': 298.278, 'duration': 2.781}, {'end': 309.865, 'text': 'So now this cost function can basically be indicated that, as we said, that the distance between the best fit point, that is this,', 'start': 301.519, 'duration': 8.346}, {'end': 311.667, 'text': 'and my real point should be minimal.', 'start': 309.865, 'duration': 1.802}, {'end': 314.949, 'text': 'So I can write an equation saying as 1 by 2m.', 'start': 312.127, 'duration': 2.822}, {'end': 322.134, 'text': 'm basically means that it is the number of points, all the points, you know, with respect to the x and y axis.', 'start': 315.57, 'duration': 6.564}, {'end': 326.518, 'text': "1 by 2m, I'll say summation of i is equal to 1 by 2m.", 'start': 322.735, 'duration': 3.783}, {'end': 333.309, 'text': 'And then I will write it as y hat minus y whole square.', 'start': 328.826, 'duration': 4.483}, {'end': 335.591, 'text': "And this is what I'm going to write it down.", 'start': 333.93, 'duration': 1.661}, {'end': 341.155, 'text': 'Now, you know that my y hat will basically be indicated by y is equal to mx plus c.', 'start': 335.931, 'duration': 5.224}, {'end': 345.758, 'text': 'This points that I have over here, right? This is basically my y hat.', 'start': 341.155, 'duration': 4.603}, {'end': 348.577, 'text': 'know this is my y hat.', 'start': 346.897, 'duration': 1.68}, {'end': 358.18, 'text': 'the points that you find out or that you predict in a best fit line is basically your y hat, and this y basically indicates the real points.', 'start': 348.577, 'duration': 9.603}, {'end': 360.7, 'text': 'you know it indicates the real points.', 'start': 358.18, 'duration': 2.52}, {'end': 364.201, 'text': 'so we should try to minimize this error.', 'start': 360.7, 'duration': 3.501}, {'end': 370.165, 'text': 'we should try to minimize this error and while minimizing whichever will,', 'start': 364.201, 'duration': 5.964}], 'summary': 'Cost function is crucial in selecting best fit line, minimizing error is important in prediction.', 'duration': 100.998, 'max_score': 269.167, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s269167.jpg'}], 'start': 45.355, 'title': 'Regression algorithm and best fit line', 'summary': 'Explains the concept of using a regression algorithm to predict house prices based on size, aiming to implement a best-fit line for future predictions. it also covers the best fit line equation y=mx+c, with m as the slope and c as the intercept, and the cost function 1/2m * summation of (y hat - y)^2, emphasizing the importance of minimizing error for efficient line selection.', 'chapters': [{'end': 82.983, 'start': 45.355, 'title': 'Understanding regression algorithm', 'summary': 'Explains the concept of using a regression algorithm to create a best-fit line to predict the price of a house based on its size from a dataset, aiming to implement a best-fit line for future price predictions.', 'duration': 37.628, 'highlights': ['Explaining the concept of using a regression algorithm The discussion focuses on the concept of using a regression algorithm to create a best-fit line for price prediction.', 'Creating a best-fit line to predict the price of a house based on its size Emphasizing the use of a best-fit line to predict house prices based on the size of the house.', 'Aiming to implement a best-fit line for future price predictions Highlighting the objective of implementing a best-fit line for future price predictions.']}, {'end': 412.123, 'start': 83.023, 'title': 'Best fit line and cost function', 'summary': 'Explains the concept of best fit line and cost function, indicating that the best fit line is indicated by the equation y=mx+c, with m representing the slope and c representing the intercept, and the cost function as 1/2m * summation of (y hat - y)^2, emphasizing the importance of minimizing the error to select the best fit line efficiently.', 'duration': 329.1, 'highlights': ['The best fit line is indicated by the equation Y=MX+C, with M representing the slope and C representing the intercept. The best fit line equation Y=MX+C is essential for determining the slope (M) and intercept (C) values in the linear regression model.', 'The cost function is expressed as 1/2m * summation of (y hat - y)^2, emphasizing the importance of minimizing the error to select the best fit line efficiently. The cost function, 1/2m * summation of (y hat - y)^2, plays a crucial role in minimizing the error to efficiently select the best fit line in linear regression.', 'The concept of minimizing the error to efficiently select the best fit line. Emphasizing the importance of minimizing the error to efficiently select the best fit line, ensuring accurate linear regression model fitting.']}], 'duration': 366.768, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s45355.jpg', 'highlights': ['Creating a best-fit line to predict the price of a house based on its size Emphasizing the use of a best-fit line to predict house prices based on the size of the house.', 'The best fit line is indicated by the equation Y=MX+C, with M representing the slope and C representing the intercept. The best fit line equation Y=MX+C is essential for determining the slope (M) and intercept (C) values in the linear regression model.', 'The cost function is expressed as 1/2m * summation of (y hat - y)^2, emphasizing the importance of minimizing the error to select the best fit line efficiently. The cost function, 1/2m * summation of (y hat - y)^2, plays a crucial role in minimizing the error to efficiently select the best fit line in linear regression.']}, {'end': 647.165, 'segs': [{'end': 539.647, 'src': 'embed', 'start': 494.258, 'weight': 0, 'content': [{'end': 497.34, 'text': 'If I make C is equal to 0, then I will be able to draw a 2D diagram.', 'start': 494.258, 'duration': 3.082}, {'end': 503.003, 'text': 'If not, if I consider C is equal to with some other value, then I have to basically draw a 3D diagram.', 'start': 497.86, 'duration': 5.143}, {'end': 508.907, 'text': 'And for a 3D diagram, it will definitely be very difficult for me to draw it over here.', 'start': 503.504, 'duration': 5.403}, {'end': 514.15, 'text': "Okay So I'm considering the C value as 0, indicating that it passes through the origin.", 'start': 509.247, 'duration': 4.903}, {'end': 517.452, 'text': 'Okay When my X value is 0 and my Y value is 0.', 'start': 514.37, 'duration': 3.082}, {'end': 521.934, 'text': 'So when I make the C value as 0, my new equation is something like Y is equal to MX.', 'start': 517.452, 'duration': 4.482}, {'end': 526.564, 'text': 'now this y hat is basically indicating my best fit line.', 'start': 523.123, 'duration': 3.441}, {'end': 530.665, 'text': 'so for x is equal to one, for x is equal to one.', 'start': 526.564, 'duration': 4.101}, {'end': 534.486, 'text': 'let me equate x is equal to one and try to find out my y hat value.', 'start': 530.665, 'duration': 3.821}, {'end': 536.946, 'text': 'and let me consider that my m slope.', 'start': 534.486, 'duration': 2.46}, {'end': 539.647, 'text': "initially i'm just initializing my m as one.", 'start': 536.946, 'duration': 2.701}], 'summary': 'Choosing c=0 results in 2d diagram; m=1 yields best fit line', 'duration': 45.389, 'max_score': 494.258, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s494258.jpg'}, {'end': 623.738, 'src': 'embed', 'start': 576.581, 'weight': 3, 'content': [{'end': 584.184, 'text': 'Similarly, Y hat when my value is one and my X value is three, because my X value is three and this particular point is three.', 'start': 576.581, 'duration': 7.603}, {'end': 587.125, 'text': 'Then again, my Y hat will actually be three.', 'start': 584.624, 'duration': 2.501}, {'end': 588.926, 'text': 'So it will pass through this particular point.', 'start': 587.445, 'duration': 1.481}, {'end': 592.567, 'text': 'Now this is what my best fit line is.', 'start': 590.666, 'duration': 1.901}, {'end': 600.688, 'text': 'know my best fit line for this particular value when my slope is 1, when my M value is 1, very important.', 'start': 594.045, 'duration': 6.643}, {'end': 605.55, 'text': 'now, after I get this particular equation, I will basically find my cost function.', 'start': 600.688, 'duration': 4.862}, {'end': 611.213, 'text': 'guys, remember, I have already discussed about the cost function and the formula is something like 1 by 2m.', 'start': 605.55, 'duration': 5.663}, {'end': 615.975, 'text': 'summation of 1 to M Y hat minus Y whole square.', 'start': 611.213, 'duration': 4.762}, {'end': 617.836, 'text': 'so this particular value have to reduce it.', 'start': 615.975, 'duration': 1.861}, {'end': 623.738, 'text': 'you know, I have to find out this error and try to reduce it, Sorry.', 'start': 617.836, 'duration': 5.902}], 'summary': 'Best fit line with slope 1 passes through (3, 3). cost function to reduce error.', 'duration': 47.157, 'max_score': 576.581, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s576581.jpg'}], 'start': 412.123, 'title': 'Linear regression and best fit line', 'summary': 'Covers finding the best fit line for given data points using the equation y=mx+c, and explains linear regression with a slope of 1, discussing the calculation of the cost function using the formula 1/2m * σ(y hat - y)^2.', 'chapters': [{'end': 517.452, 'start': 412.123, 'title': 'Best fit line for data', 'summary': 'Discusses finding the best fit line for given data points, using the equation y=mx+c, and considering c=0 to draw a 2d diagram for simplicity.', 'duration': 105.329, 'highlights': ['The real data is given by the equation y=x, where the x and y values match, forming the basis for finding the best fit line.', 'Considering c=0 allows for the drawing of a 2D diagram, simplifying the visualization process, as opposed to a 3D diagram which would be more complex.', 'The equation y=mx+c is used to find the best fit line for the given data points, with c=0 chosen to ensure the line passes through the origin.']}, {'end': 647.165, 'start': 517.452, 'title': 'Linear regression and cost function', 'summary': 'Explains the concept of linear regression with a slope of 1, illustrating the best fit line passing through specific points, and discusses the calculation of the cost function using the formula 1/2m * σ(y hat - y)^2.', 'duration': 129.713, 'highlights': ['The best fit line passes through specific points when the slope is 1, with y hat values of 1, 2, and 3 corresponding to x values of 1, 2, and 3, respectively. The best fit line is demonstrated passing through specific points (1, 1), (2, 2), and (3, 3) when the slope is 1, illustrating the relationship between x and y hat values.', 'The formula for the cost function, 1/2m * Σ(Y hat - Y)^2, is discussed for calculating the error and minimizing it. The cost function formula 1/2m * Σ(Y hat - Y)^2 is introduced as a means to calculate and reduce the error, emphasizing the importance of minimizing the error in the regression model.']}], 'duration': 235.042, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s412123.jpg', 'highlights': ['The equation y=mx+c is used to find the best fit line for the given data points, with c=0 chosen to ensure the line passes through the origin.', 'The real data is given by the equation y=x, forming the basis for finding the best fit line.', 'Considering c=0 allows for the drawing of a 2D diagram, simplifying the visualization process.', 'The best fit line passes through specific points when the slope is 1, with y hat values of 1, 2, and 3 corresponding to x values of 1, 2, and 3, respectively.', 'The formula for the cost function, 1/2m * Σ(Y hat - Y)^2, is discussed for calculating the error and minimizing it.']}, {'end': 992.274, 'segs': [{'end': 673.745, 'src': 'embed', 'start': 647.165, 'weight': 0, 'content': [{'end': 651.366, 'text': 'So this will be 2 minus 2 whole square plus 3 minus 3 whole square.', 'start': 647.165, 'duration': 4.201}, {'end': 655.491, 'text': 'So when I equate all these things, obviously my M value is three points.', 'start': 652.008, 'duration': 3.483}, {'end': 660.715, 'text': 'So M is actually three, you know, one by six multiplied by zero is nothing but zero.', 'start': 655.751, 'duration': 4.964}, {'end': 663.017, 'text': 'Okay So now this is very, very clear.', 'start': 661.075, 'duration': 1.942}, {'end': 670.042, 'text': 'When my M value, when my slope was one, you know, and for this point, I got the cost function as zero.', 'start': 663.417, 'duration': 6.625}, {'end': 673.745, 'text': "So what I'll do is that I will try to draw one more diagram.", 'start': 670.422, 'duration': 3.323}], 'summary': 'M value is 3, cost function at m=1 is 0.', 'duration': 26.58, 'max_score': 647.165, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s647165.jpg'}, {'end': 759.528, 'src': 'heatmap', 'start': 710.142, 'weight': 0.808, 'content': [{'end': 716.164, 'text': "what i'm trying to do it in in this particular thing is that, with respect to every m value that i've initialized,", 'start': 710.142, 'duration': 6.022}, {'end': 718.005, 'text': "what is the cost function that i've got?", 'start': 716.164, 'duration': 1.841}, {'end': 719.946, 'text': "i'm going to plot it over now.", 'start': 718.005, 'duration': 1.941}, {'end': 727.008, 'text': 'initially here, with respect to the m value as one, you know, i have got my cost function as zero.', 'start': 719.946, 'duration': 7.062}, {'end': 729.849, 'text': "so what i'm going to do my m value is one over here.", 'start': 727.008, 'duration': 2.841}, {'end': 730.949, 'text': 'my cost function is zero.', 'start': 729.849, 'duration': 1.1}, {'end': 732.59, 'text': "so this is the point that i'm going to get.", 'start': 730.949, 'duration': 1.641}, {'end': 735.039, 'text': 'I hope it is pretty clear.', 'start': 733.939, 'duration': 1.1}, {'end': 738.341, 'text': "Now, in my next step, what I'll do, I'll change this m value.", 'start': 735.6, 'duration': 2.741}, {'end': 742.822, 'text': 'Suppose I take my m value as 0.5.', 'start': 738.981, 'duration': 3.841}, {'end': 751.305, 'text': 'Now, with respect to m is equal to 0.5, for this equation, if I equate, my y hat for x is equal to 1 will be 0.5.', 'start': 742.822, 'duration': 8.483}, {'end': 755.086, 'text': 'My y hat for x is equal to 2 will be 1.', 'start': 751.305, 'duration': 3.781}, {'end': 759.528, 'text': 'And my y hat for x is equal to 3 will be 1.5.', 'start': 755.086, 'duration': 4.442}], 'summary': 'Analyzing cost function for different m values and plotting the results.', 'duration': 49.386, 'max_score': 710.142, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s710142.jpg'}, {'end': 801.501, 'src': 'embed', 'start': 770.373, 'weight': 1, 'content': [{'end': 777.477, 'text': 'then when when my slope is 0.5 and my x value is 3, you know, 3 into 0.5 is 1.5.', 'start': 770.373, 'duration': 7.104}, {'end': 785.48, 'text': 'so i will be getting new points somewhere like this one, two and three.', 'start': 777.477, 'duration': 8.003}, {'end': 785.921, 'text': 'so this is my.', 'start': 785.48, 'duration': 0.441}, {'end': 788.898, 'text': 'oh sorry, this is my 1.5.', 'start': 787.037, 'duration': 1.861}, {'end': 792.078, 'text': 'so when i draw my best fit line, it will look like this.', 'start': 788.898, 'duration': 3.18}, {'end': 799.941, 'text': 'you know now, when i try to find out the cost function, when my m value is 0.5, you know i will be getting.', 'start': 792.078, 'duration': 7.863}, {'end': 801.501, 'text': 'you just have to equate in this.', 'start': 799.941, 'duration': 1.56}], 'summary': 'Slope of 0.5 at x=3 results in new points; m=0.5 yields cost function.', 'duration': 31.128, 'max_score': 770.373, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s770373.jpg'}, {'end': 924.857, 'src': 'heatmap', 'start': 857.091, 'weight': 3, 'content': [{'end': 858.811, 'text': 'Your next point will be coming somewhere here.', 'start': 857.091, 'duration': 1.72}, {'end': 869.439, 'text': 'know. then, similarly, for different, different m values, you know, you will be getting points which will form this kind of curvature,', 'start': 859.795, 'duration': 9.644}, {'end': 876.341, 'text': 'this kind of curvature, for different, different m values, you know, and when you draw this, when you draw this,', 'start': 869.439, 'duration': 6.902}, {'end': 887.946, 'text': 'you will be getting a diagram which looks somewhere like this, which looks somewhere like this, and this is basically called as a gradient descent.', 'start': 876.341, 'duration': 11.605}, {'end': 894.006, 'text': "this gradient descent plays a very important role, guys, which i'm going to explain you in the next screen.", 'start': 889.304, 'duration': 4.702}, {'end': 902.089, 'text': 'now, once you get this gradient descent, when should you know that you should stop, you know,', 'start': 894.006, 'duration': 8.083}, {'end': 907.551, 'text': 'for selecting a m value which looks good for this regression line or for the best fitment?', 'start': 902.089, 'duration': 5.462}, {'end': 909.492, 'text': "that is the next thing that i'm going to discuss.", 'start': 907.551, 'duration': 1.941}, {'end': 914.733, 'text': "so before that, i'm going to clear all this diagram, and let me just focus on two things.", 'start': 909.492, 'duration': 5.241}, {'end': 916.014, 'text': 'one is the gradient descent.', 'start': 914.733, 'duration': 1.281}, {'end': 920.195, 'text': 'As I said that this is my M value.', 'start': 917.734, 'duration': 2.461}, {'end': 923.336, 'text': 'This is my cost function that is J of M.', 'start': 920.235, 'duration': 3.101}, {'end': 924.497, 'text': "And here I'll write it as 0.5, 1, 2,.", 'start': 923.336, 'duration': 1.161}, {'end': 924.857, 'text': 'sorry, 1.5, 2, 2.5,.', 'start': 924.497, 'duration': 0.36}], 'summary': 'The transcript covers the concept of gradient descent and determining the best fit m value for regression lines.', 'duration': 67.766, 'max_score': 857.091, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s857091.jpg'}], 'start': 647.165, 'title': 'Cost function and gradient descent', 'summary': 'Discusses the cost function analysis for slope values, including specific values for m=3 and m=1, and delves into the process of calculating the cost function for a slope of 0.5, resulting in a cost function value of 0.58. it also explains the concept of gradient descent in regression, emphasizing its role in finding the best fit for different m values and visually illustrating the process.', 'chapters': [{'end': 742.822, 'start': 647.165, 'title': 'Cost function analysis for slope', 'summary': 'Discusses the calculation of the cost function for various slope values, where the slope m is found to be 3, and the cost function for m=1 is 0.', 'duration': 95.657, 'highlights': ['The slope M is calculated to be 3, representing a key quantifiable result in the analysis.', 'The cost function for M=1 is found to be 0, indicating a specific outcome for a particular slope value.', 'A diagram is drawn to illustrate the relationship between different slope values and their corresponding cost functions, providing a visual representation of the analysis.']}, {'end': 854.85, 'start': 742.822, 'title': 'Calculating cost function for slope 0.5', 'summary': 'Discusses the process of calculating the cost function for a slope of 0.5, indicating the corresponding y hat values for x, and ultimately obtaining a cost function value of 0.58.', 'duration': 112.028, 'highlights': ['The cost function is calculated by squaring the differences between the predicted y hat values and the actual y values, summed over all data points, resulting in a cost function value of 0.58 for a slope of 0.5.', 'The y hat values for x equal to 1, 2, and 3 are determined as 0.5, 1, and 1.5 respectively when the slope is 0.5.', 'Explanation of how to obtain y hat values by equating the given equation and applying the slope values to x, where for slope 0.5, the y hat values are 0.5, 1, and 1.5 for x equal to 1, 2, and 3 respectively.']}, {'end': 992.274, 'start': 854.85, 'title': 'Understanding gradient descent in regression', 'summary': 'Explains the concept of gradient descent in regression, showcasing its importance in finding the best fitment for different m values and discussing the criteria for stopping the selection of an m value, culminating in the visualization of the gradient descent process.', 'duration': 137.424, 'highlights': ['The chapter emphasizes the significance of gradient descent in finding the best fitment for different m values, illustrating the process with diagrams and visualizations.', 'It discusses the criteria for determining when to stop the selection of an m value for regression line, providing a comprehensive explanation of the process.', 'The speaker focuses on visualizing the gradient descent process, highlighting its importance in understanding the concept of regression and the selection of m values.']}], 'duration': 345.109, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s647165.jpg', 'highlights': ['The cost function for M=1 is found to be 0, indicating a specific outcome for a particular slope value.', 'The cost function is calculated by squaring the differences between the predicted y hat values and the actual y values, summed over all data points, resulting in a cost function value of 0.58 for a slope of 0.5.', 'The slope M is calculated to be 3, representing a key quantifiable result in the analysis.', 'The chapter emphasizes the significance of gradient descent in finding the best fitment for different m values, illustrating the process with diagrams and visualizations.']}, {'end': 1253.559, 'segs': [{'end': 1076.872, 'src': 'heatmap', 'start': 1015.164, 'weight': 0.786, 'content': [{'end': 1018.666, 'text': 'Now the next thing is that I need to arrive at this particular position.', 'start': 1015.164, 'duration': 3.502}, {'end': 1027.147, 'text': 'So for that initially, suppose, I consider that based on some m value, i got my initial point somewhere over here.', 'start': 1018.807, 'duration': 8.34}, {'end': 1028.69, 'text': 'you know, somewhere over here.', 'start': 1027.147, 'duration': 1.543}, {'end': 1036.175, 'text': 'so when i get my initial point over here, that basically means that i have to move downwards right.', 'start': 1028.69, 'duration': 7.485}, {'end': 1041.54, 'text': 'so in order to move downwards, i will basically write a theorem which is called as convergence theorem.', 'start': 1036.175, 'duration': 5.365}, {'end': 1053.898, 'text': 'Now, for this convergence theorem basically says that the m value you should subtract with m minus derivative of m,', 'start': 1043.492, 'duration': 10.406}, {'end': 1060.802, 'text': 'you know derivative of m with respect to m, you know derivative of m with respect to m,', 'start': 1053.898, 'duration': 6.904}, {'end': 1070.326, 'text': 'such that you know this derivative multiplied by one more value which is called as learning rate, which is basically indicated by alpha.', 'start': 1060.802, 'duration': 9.524}, {'end': 1071.587, 'text': 'So this is my learning rate.', 'start': 1070.386, 'duration': 1.201}, {'end': 1076.872, 'text': 'Okay, now let me just show you why this particular equation works.', 'start': 1073.769, 'duration': 3.103}], 'summary': 'Using convergence theorem, update m value by subtracting derivative of m with respect to m multiplied by learning rate alpha.', 'duration': 61.708, 'max_score': 1015.164, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1015164.jpg'}, {'end': 1149.857, 'src': 'heatmap', 'start': 1102.582, 'weight': 0.702, 'content': [{'end': 1107.307, 'text': 'so if i want to find out the slope, you just have to draw a straight line like this.', 'start': 1102.582, 'duration': 4.725}, {'end': 1112.009, 'text': 'okay, And this particular straight line is basically helping you to find out the derivative of the slope.', 'start': 1107.307, 'duration': 4.702}, {'end': 1119.992, 'text': 'When I draw this particular slope, the next thing I have to find out whether this is a positive slope or a negative slope.', 'start': 1112.469, 'duration': 7.523}, {'end': 1121.453, 'text': 'That is important to find out.', 'start': 1120.352, 'duration': 1.101}, {'end': 1128.435, 'text': 'Now how to find out whether this is positive or negative?. Now you should see or focus on the right hand of the slope and the left hand of the slope.', 'start': 1121.953, 'duration': 6.482}, {'end': 1134.398, 'text': 'If the right side or the right hand of the slope is pointing downwards, you know is pointing downwards.', 'start': 1129.036, 'duration': 5.362}, {'end': 1137.099, 'text': 'at that time you can say that this is basically a negative slope.', 'start': 1134.398, 'duration': 2.701}, {'end': 1139.392, 'text': 'you know, the negative slope.', 'start': 1138.131, 'duration': 1.261}, {'end': 1146.215, 'text': 'Now you can see that at this particular point, suppose my m value was somewhere like minus 0.5, okay?', 'start': 1139.992, 'duration': 6.223}, {'end': 1149.857, 'text': 'Then your feasible m value is somewhere around one.', 'start': 1146.676, 'duration': 3.181}], 'summary': "The slope can be found by drawing a straight line. positive or negative slope is determined by the direction of the line's right and left hand sides.", 'duration': 47.275, 'max_score': 1102.582, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1102582.jpg'}, {'end': 1253.559, 'src': 'embed', 'start': 1228.27, 'weight': 0, 'content': [{'end': 1237.091, 'text': 'zero what will happen is that instead of taking this smaller step, this point may jump to some other points like this.', 'start': 1228.27, 'duration': 8.821}, {'end': 1243.653, 'text': 'okay, this may take a longer jump and it may not reach this global minimum even after many iterations.', 'start': 1237.091, 'duration': 6.562}, {'end': 1247.975, 'text': 'even after many iteration, it may not reach this global.', 'start': 1244.813, 'duration': 3.162}, {'end': 1253.559, 'text': 'So for that reason, we usually select the learning rate value as a very smaller value.', 'start': 1248.356, 'duration': 5.203}], 'summary': 'To prevent overshooting, a smaller learning rate is preferred for convergence.', 'duration': 25.289, 'max_score': 1228.27, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1228270.jpg'}], 'start': 995.07, 'title': 'Convergence theorem and learning rate', 'summary': 'Discusses the significance of selecting a smaller learning rate for reaching the global minimum and the ramifications of choosing a larger learning rate, supported by quantitative examples and explanations.', 'chapters': [{'end': 1253.559, 'start': 995.07, 'title': 'Convergence theorem and learning rate', 'summary': 'Discusses the convergence theorem and learning rate, emphasizing the importance of selecting a smaller learning rate to reach the global minimum and the consequences of selecting a larger learning rate, backed by quantitative examples and explanations.', 'duration': 258.489, 'highlights': ['The convergence theorem states that to move towards the global minimum, the m value should be subtracted by the derivative of m multiplied by the learning rate, where selecting a smaller learning rate, such as 0.001, results in very small steps towards the global minimum, while a larger learning rate can lead to overshooting the global minimum.', 'Emphasizes the significance of a smaller learning rate, such as 0.001, in gradually approaching the global minimum, as larger learning rates may cause the point to jump to different positions and potentially fail to converge to the global minimum.']}], 'duration': 258.489, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s995070.jpg', 'highlights': ['Selecting a smaller learning rate, like 0.001, results in very small steps towards the global minimum.', 'A larger learning rate can lead to overshooting the global minimum and potentially fail to converge.']}, {'end': 1454.309, 'segs': [{'end': 1301.822, 'src': 'embed', 'start': 1274.64, 'weight': 0, 'content': [{'end': 1279.065, 'text': "i'll see that my right hand side is pointing upwards and my left hand side is pointing downwards.", 'start': 1274.64, 'duration': 4.425}, {'end': 1286.618, 'text': 'so this is basically my positive slope, And when I try to find out a derivative of a positive slope,', 'start': 1279.065, 'duration': 7.553}, {'end': 1291.599, 'text': 'this basically indicates that my derivative will be nothing but M minus.', 'start': 1286.618, 'duration': 4.981}, {'end': 1294.68, 'text': 'This derivative will basically be a positive value.', 'start': 1292.219, 'duration': 2.461}, {'end': 1301.822, 'text': "And then I'm going to multiply with my learning rate, then which will be nothing but M minus some smaller value.", 'start': 1295.48, 'duration': 6.342}], 'summary': 'The positive slope indicates a positive derivative, to be multiplied by the learning rate.', 'duration': 27.182, 'max_score': 1274.64, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1274640.jpg'}, {'end': 1366.255, 'src': 'heatmap', 'start': 1313.51, 'weight': 1, 'content': [{'end': 1320.144, 'text': 'So always it is very important to understand that our learning rate should be very, very small.', 'start': 1313.51, 'duration': 6.634}, {'end': 1324.707, 'text': 'And this conversion theorem is very, very important to reach this particular global minimum point.', 'start': 1320.204, 'duration': 4.503}, {'end': 1331.772, 'text': 'So as soon as it reaches over here, at this particular point, if I try to find out the slope, the slope will be zero.', 'start': 1325.128, 'duration': 6.644}, {'end': 1333.733, 'text': 'The slope will be zero.', 'start': 1332.453, 'duration': 1.28}, {'end': 1343.02, 'text': 'And when I have a slope is zero, that time my M value will actually my M value will specify that this should be the value,', 'start': 1334.554, 'duration': 8.466}, {'end': 1349.266, 'text': 'or this should be the slope of the best fit point, that fit line.', 'start': 1343.02, 'duration': 6.246}, {'end': 1352.828, 'text': 'and till then i have to follow this convergence.', 'start': 1349.266, 'duration': 3.562}, {'end': 1359.912, 'text': 'so once i am a, once i get to this particular point, at this particular location, when my slope is zero, i will basically,', 'start': 1352.828, 'duration': 7.084}, {'end': 1366.255, 'text': 'or my algorithm will basically, be considering this m value as my best fit, as the slope of the best fit line,', 'start': 1359.912, 'duration': 6.343}], 'summary': 'Learning rate should be very small for reaching global minimum. slope being zero indicates best fit point.', 'duration': 52.745, 'max_score': 1313.51, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1313510.jpg'}, {'end': 1408.217, 'src': 'embed', 'start': 1383.589, 'weight': 2, 'content': [{'end': 1390.691, 'text': "Now, the next thing is that if I have multiple multiple features, in suppose, if I just I don't just have only one independent feature,", 'start': 1383.589, 'duration': 7.102}, {'end': 1391.971, 'text': 'I have multiple independent features.', 'start': 1390.691, 'duration': 1.28}, {'end': 1398.772, 'text': 'At that particular point of time, my gradient descent will look like a 3D diagram or a 4D diagram based on the number of features.', 'start': 1392.509, 'duration': 6.263}, {'end': 1406.016, 'text': 'And each and every feature will try to move towards the global minimum point, which will be this particular minimum point.', 'start': 1399.172, 'duration': 6.844}, {'end': 1408.217, 'text': 'I hope you like this particular discussion, guys.', 'start': 1406.036, 'duration': 2.181}], 'summary': 'Gradient descent with multiple features creates 3d or 4d diagrams, aiming for global minimum.', 'duration': 24.628, 'max_score': 1383.589, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1383589.jpg'}], 'start': 1254.74, 'title': 'Derivatives and gradient descent', 'summary': 'Discusses finding derivatives of positive slopes and emphasizes the significance of a small learning rate and convergence theorem in reaching the global minimum point in linear regression, as well as the process for multiple features in gradient descent.', 'chapters': [{'end': 1294.68, 'start': 1254.74, 'title': 'Derivative of positive slope', 'summary': 'Discusses the concept of finding the derivative of a positive slope by considering a random m value and analyzing the direction of the slope, concluding that the derivative will result in a positive value.', 'duration': 39.94, 'highlights': ['Analyzing the direction of the slope when a random M value is selected reveals that the right-hand side points upwards and the left-hand side points downwards, indicating a positive slope.', 'The derivative of a positive slope is determined to be a positive value.']}, {'end': 1454.309, 'start': 1295.48, 'title': 'Gradient descent in linear regression', 'summary': 'Explains the importance of a small learning rate and the convergence theorem in reaching the global minimum point in linear regression, while also highlighting the process for multiple features in gradient descent.', 'duration': 158.829, 'highlights': ['The importance of a small learning rate and the convergence theorem in reaching the global minimum point in linear regression is emphasized, as it ensures the slope is zero, indicating the best fit point (M value).', 'In the case of multiple independent features, the gradient descent process resembles a 3D or 4D diagram, with each feature moving towards the global minimum point.', 'The video provides step-by-step explanations and a link for implementing simple and multiple linear regression.', 'The presenter encourages viewers to revisit the video for a better understanding of the concepts and processes, and also promotes subscribing to the channel for future content.']}], 'duration': 199.569, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/1-OGRohmH2s/pics/1-OGRohmH2s1254740.jpg', 'highlights': ['The derivative of a positive slope is determined to be a positive value.', 'The importance of a small learning rate and the convergence theorem in reaching the global minimum point in linear regression is emphasized, as it ensures the slope is zero, indicating the best fit point (M value).', 'In the case of multiple independent features, the gradient descent process resembles a 3D or 4D diagram, with each feature moving towards the global minimum point.']}], 'highlights': ['The best fit line equation Y=MX+C is essential for determining the slope (M) and intercept (C) values in the linear regression model.', 'The cost function, 1/2m * summation of (y hat - y)^2, plays a crucial role in minimizing the error to efficiently select the best fit line in linear regression.', 'The cost function for M=1 is found to be 0, indicating a specific outcome for a particular slope value.', 'The slope M is calculated to be 3, representing a key quantifiable result in the analysis.', 'Selecting a smaller learning rate, like 0.001, results in very small steps towards the global minimum.', 'The importance of a small learning rate and the convergence theorem in reaching the global minimum point in linear regression is emphasized, as it ensures the slope is zero, indicating the best fit point (M value).']}