Sir i am your fan now, i finished my degree in statistics ,mathematics ,and computer scinece but we did not have any practise In machine learning , i am following you and try to learn in this very well and after that i want to build my own company , currently i am working as a combined maths teacher but i need to change my career as a data scientist , i love to learn from you sir
After reading that you do this tutorial after 9 to 6 job I really appreciate your work and now I can understand why you take time to make a new video. It's really hard to give weekend for making videos because we already have lot of other things to do at weekend. Thank you so much for all the effort you put it's really awesome.
After going through many youtubers, tutors, I was not able to start with the ML concepts,coding. Your content is awesome, very easy to understand. Thanks for these videos & your time. Appreciated...
Exercise result: reg.predict([[2,9,6]]) >>>array([[53205.96797671]]) reg.predict([[12,10,10]]) >>>array([[92002.18340611]]) Note : my result is little bit different from your "exercise_answer.ipynb" because you told to take meadian of test_score but did mean. your result: reg.predict([[2,9,6]]) >>>array([[53713.86677124]]) reg.predict([[12,10,10]]) >>>array([[93747.79628651]]) Thanks for this amazing tutorial
@@eternalsgaming2467 from word2number import w2n df = pd.DataFrame(df) # Function to convert experience string to number and handle NaN def convert_experience(x): if pd.isna(x): return 0 # Replace NaN with 0 try: return w2n.word_to_num(x) # Convert text to number except ValueError: return 0 # Replace non-convertible strings with 0 # Apply the function to the 'experience' column df['experience'] = df['experience'].apply(convert_experience) # Print the DataFrame after conversion print(df)
@@eternalsgaming2467 import word2number word_list = df1.experience list_number = [] word_list = word_list.dropna() for word in word_list: number = w2n.word_to_num(word) list_number.append(number) df1.loc[~df1.experience.isna(), 'experience'] = list_number this is my way
@@eternalsgaming2467 here you go sir df.fillna({'experience':'zero','test_score(out of 10)':md},inplace=True) df.experience = df['experience'].astype(str) df['experience'] = df['experience'].apply(w2n.word_to_num) pehle nan values ki jgh zero rakha fir in sabko string format mein change kiya and then word2number library ka use karke un sabko badla seedha w2n.word_to_num(df.experience) isiliye nhi kiya kyuki w2n ko ek ek value chahiye hoti h rather than a column hope so aapko samajh aaya ho brother
This video was posted 6 years ago but it's still very helpful and very understandable, when people on TH-cam were talking about linear regression i thought building a model would be very hard but it seems a bit easier and also sir you have an excellent talent to teach harder things to people like me . Thank you very much .
9:00 Now, we can find the predicted price of a house using the values we obtained. We have the equation, price = m1*area + m2*bedrooms + m3*age + b Now that we know the coefficients, m1, m2, m3, and the intercept, b, we can find the price. The given, the values of the three features will give us the predicted price, will be saved in our object variable,
Hey, first of all thank you for the great tutorials. I'd like to point out one thing. Regression with multiple variables is "Multiple Regression" and not "Multivariate regression", unless we are predicting more than 1 outcome. Since in the video you are predicting only the price, i.e., only one output, it's "Multiple Regression".
Yes, this video is about univariate multiple linear regression. I am actually looking for multivariate case.. I have a question here that is multivariate case just a repeated method of univariate case i.e. doing univariate iteratively for multiple DVs is equivalent to multivariate case?
Great video. As per my understanding, Linear regression with multiple variables and multivariate regression are two different concepts. Linear regression with multiple variables deals with a single dependent variable and multiple independent variables, while multivariate regression deals with multiple dependent variables.
For the exercise, to change the object numbers to int, we can also use the Lambda function as follows: df.experience = df.experience.map(lambda x:w2n.word_to_num(x))
Sir u know what is wrong here. When u predict price for area=3000, badroom=3 and age=40 then it will be 44000 (approximately) but when u change the age=15 in this. Then price 100% less then 56000. But your prize is increased in this case which is abnormal. Can u explain it.
@@jayvardhanjagarwal8973 when the house is older the price of house value decreases.so that is why for area=3000, bedroom=3 and age=40 then predicted price will be 444,400 but when house is bit younger at same other features area=3000, bedroom=3 and age=15, predicted house price is 615,000. Yet i his actual data set for the features area=3000,age-15.bedroom=4, the actual price is 565,000, which is less than his predicted value for a house which is 15 years old,yet 3 bedrooms, as his model has a bit skewness.we cant expect models to be 100% accurate.but when they like over 80% accurate we use such models for our work purposes as they are fairly good models,difficult to get as such 80% or more accuracy
Hi there, i have watched a few of your videos on Pandas and LinearRegression since this morning and I must say, it is very easy to follow you. I appreciate you are not too fast allowing time to catch up. Thanks for the learnings.
10:28 reg.predict(3000, 3, 40) Here, area = 3000, bedrooms = 3, age = 40. The output is an array of a value: array([444400.]). Notice, how this can be manually calculated. 137.25*3000 + -26025*3 + -6825*40 + 383724.99999999983 444399.9999999998 which is approximately equal to 444400. Brilliant, codebasics !! Comprehensive. This simplified version of yours is highly commendable.
I like the way you are explaining terms and logic. I realty appreciate your effort. Please share more video like this. Don't stop to make more video on machine learning. keep it up
Just wanted to thank you for your awesome teaching, keep up the good work! From all the content I've seen, yours is the most "hands-on" the perfect combination of theory and exercises applying said theory!
The way you are explaining, means you love teaching. I am a teacher, and on the basis of my experience I must say that you should teach in engineering colleges may part time.
The videos are truly excellent! Although I rarely leave comments on educational videos, your concise video series has been incredibly beneficial to me. I appreciate the way you seamlessly integrate teaching with practical coding examples. Keep up the great work
Hi, This works. First fill the blanks in the experience column with 'zero' ... and then use w2n.word_to_num df.experience = df.experience.fillna('zero') df.experience = df.experience.apply(lambda x: w2n.word_to_num(x))
Thanks a lot from where you got this code - " df.experience = df.experience.apply(lambda x: w2n.word_to_num(x))" why you have used "lambda x" it is not given in the original documentation at - pypi.org/project/word2number/ i also checked the word2number official code snippet at github managed by the original contributer "Akshay Nagpal" -- github.com/akshaynagpal/w2n/blob/master/word2number/w2n.py.
Your lectures is so good. At first I faced some problems for the word to number function. Even after installation I write "from word2number import w2n" on my code, but it wasn't work. Then I restart my jupyter notebook & now it is working well. :D
Your videos are saviour and i was trying to learn ML from different sources but still find your tutorials the best. You have nice & crisp explanations. One humble request please upload more videos on ML.
Thanks for providing amazing video Now I got to know about that codebasics is one of the top Indian channel for data science because you were uploading quality video with God explainetion from starting only I have seen many people they create short video and they just explain very easy concept so that people will feel bored and they will more reach to their channel and video
you are genius sir i learnt today many things my institute should watch your videos that how to teach students swiftly.. thanks a lot sir continue helping us...
The best tutorial all over the web.Using complex math words are not enough and not at all usefull.But explaining practically like you is what we who students want.You are my life saviour.I am trying to find how the coefficients are used to calculate predicted value since yesterday.I ended up here in this awsome tutorial.You got my subscribe and like.And will continue to get so.Thank you soo much
Preetham thanks for the comment. And yes majority of people use fency terms which I hate from the bottom of my heart. My mission on this channel is to break down concepts in easy terms. Happy learning 😊👍
@@codebasics I am glad that i found your channel.I am able to see the difference between the instructor i have in my course i am taking on udemy and you.He just started ML course with linear regression but due to major usage of fancy terms i am unable to understand.
@@codebasics Looking forward to get to learn more from your amazing channel.Please try to make video on Evaluation metrics for regression and classification.Thank you
In an actual case in work, there are many columns variables more rows that could run into thousands of rows, close to a hundred columns in which the interaction is not obvious. Agreed the first step is data preparation, data cleansing all NaN, missing rows/column elements given such situation it would better to do a preliminary data exploration by data mining or designed experiment to see what interacts what for what. This is the only time you can actually write out the linear equation actually which are composed of independent variables that either reinforce the prediction (all positive polarity} or that contradict it (all negative polarity).
I agree with you... In real life data is much more complicated. Specially when we have multiple dependent variables as well instead only one....In real life scenarios thousands of variables (both independent/dependent) interact each other. To create a model for such a scenario is really challenging and benefit of AI can only be realized then....
Thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou ❤️❤️❤️❤️❤️❤️❤️❤️❤️ watched all videos at a time ....before I feel like don't I understand these topics ..but u made this topic easy 💫❤️
Thank you for the explanation, I have just started with machine learning in Python and it was really helpful.🙏 Just nitpicking being from math background, the value for the field NaN will be min 4, to make sense of the dataset. 😅
In the practice example, you have assigned the 'mean' value instead of the 'median' of the test_score values. That's why, there is a slight deviation in the predicted salaries when compared to the solution, 1) 53205.96 and 2) 92002.18
If your notebook gives warning regarding "no variable for X" then you can train with this type of line. reg.fit(df[['area','bedrooms','age']].values,df.price.values) include the '.values' and it will be fine.
Solution: Ex 1: 53713.86677124 Ex 2: 93747.79628651 *Note:* For those, who are getting a slightly different answer. It's because, to replace *missing value* in *column 2* , we have used *mean* here instead of *median*
another great video, thanks. I slightly disagree with example setting and how you solved it. I think that average would be better for test score, not median as in main tutorial with house pricing. But even assuming that median would be better, you don't have to floor the median in this example, as you did with bedrooms. Obviously, bedrooms cannot be 3.4 or 5.6, but median or average test scores, especially for building an accurate linear model - can and should be. Thus my answer is slightly different - 53205 and 92002. Though, it is more art than hard science (average vs median and whether to round the median or not) and your tutorial and example were great, as usual. PS Did not know about word2number - neat idea. Though they say it should not work with 3.6 i have not had any problems with it.
Hi Xavier. I had the same issue. I needed to set df.bedrooms = df.bedrooms.fillna(median_bedrooms). When I had the issue you're facing, my code was just df.bedrooms.fillna(median_bedrooms) so i think i was just displaying the correct data set but not actually updating my data set with the correct data. hope it helps.
I corresponded with the @codebasics teacher regarding the results @9:30 for the: reg.predict([[3000, 3, 15]]) with 3 bedrooms, versus reg.predict([[3000, 4, 15]]) with 4 bedrooms. He responded that his updates to his GitHub repository code (URL above) currently generates the correct results: reg.predict([[3000, 3, 15]]) => 579201.199 reg.predict([[3000, 4, 15]]) => 602590.079 -- Many thanks!
It would be nice to show the R^2 and which independent variable is effecting the dependent variable the most. This would allow people to know which variable to focus on when buying a house. I’ve never used Panda but it’s a simple line of code in R.
In the solution for the exercise (as given in github), you have taken the mean(for the test score). But the variable is named as "median_test_score". Is it how it is meant to be (I have pasted that part of the code)? median_test_score = math.floor(d['test_score(out of 10)'].mean()) median_test_score
instead of using external library, we can also use pandas replace method with dict as parameter word2number = {'zero':0,'one':1,'two':2,'three':3,'four':4,'five':5,'six':6,'seven':7,'eight':8,'nine':9,'ten':10,'eleven':11} d.replace({"experience": word2number},inplace=True)
So far no one had posted data drift and concept drift request you to please explain with the dataset... Thanks . I'm following your channel since 2018.
Your understandable expression was very useful, thank you. By the way, I did not find it logical to fill the empty spaces in experience with median. I found the answers of exercise as follows; 47056 and 88227. Conversion to integer can also be done by using the map function for experience; df.experience = df.experience.map ({"two": 2, "three": 3, "five": 5, "loving": 7, "from": 10, "eleven": 11})
from word2number import w2n df.experience = [w2n.word_to_num(x) for x in df.experience] It can be done in one line. It's useful because if there are 1000 rows, we can't do it by hand.
Hey, have you ever done mulvariate multiple regression with several dependent variables (statistics used MANOVA, MANCOVA)? Would like to see a video on that especially explanation of benefits over several ANOVAS.
Anyone knows the rationale behind filling zeros for the missing values in the "experience" column? How do we come to an assumption that these candidates have no experience? This newbie appreciates any feedback 😊 Also, Mr Dhaval, I appreciate you taking time to make this tutorial for all of us! I watch all the ads as a way of saying thanks ☺️
Wonderful tutorial Teach! Would like to know 'how to plot scatter plot from multiple independent variables and one dependent variable', which I think is the only missing piece in the video. Thanks in advance
Check out our premium machine learning course with 2 Industry projects: codebasics.io/courses/machine-learning-for-data-science-beginners-to-advanced
hii sir if possible can you please post slides also sir
Sir i am your fan now, i finished my degree in statistics ,mathematics ,and computer scinece but we did not have any practise In machine learning , i am following you and try to learn in this very well and after that i want to build my own company , currently i am working as a combined maths teacher but i need to change my career as a data scientist , i love to learn from you sir
After reading that you do this tutorial after 9 to 6 job I really appreciate your work and now I can understand why you take time to make a new video. It's really hard to give weekend for making videos because we already have lot of other things to do at weekend. Thank you so much for all the effort you put it's really awesome.
After going through many youtubers, tutors, I was not able to start with the ML concepts,coding. Your content is awesome, very easy to understand. Thanks for these videos & your time. Appreciated...
I am glad Ketan that this was useful to you.
You are gifted with a great skill of conveying difficult things in an easier and simpler manner! Excellent work!
Thank you! Cheers!
@@codebasics Sir if I take the same area, rooms and age given in the csv then why its not showing the same price as that ?
@@narottamaswal3978 yaa median are different...
@@limbadhiren I got the median value 4
Most unrated vedio for regression
I watched 5 videos including nptel,'s and edureka but you are great deserves millions like
Exercise result:
reg.predict([[2,9,6]])
>>>array([[53205.96797671]])
reg.predict([[12,10,10]])
>>>array([[92002.18340611]])
Note : my result is little bit different from your "exercise_answer.ipynb" because you told to take meadian of test_score but did mean.
your result:
reg.predict([[2,9,6]])
>>>array([[53713.86677124]])
reg.predict([[12,10,10]])
>>>array([[93747.79628651]])
Thanks for this amazing tutorial
Can you tell how did you convert the experience string column to integer
@@eternalsgaming2467 from word2number import w2n
df = pd.DataFrame(df)
# Function to convert experience string to number and handle NaN
def convert_experience(x):
if pd.isna(x):
return 0 # Replace NaN with 0
try:
return w2n.word_to_num(x) # Convert text to number
except ValueError:
return 0 # Replace non-convertible strings with 0
# Apply the function to the 'experience' column
df['experience'] = df['experience'].apply(convert_experience)
# Print the DataFrame after conversion
print(df)
@@eternalsgaming2467 import word2number
word_list = df1.experience
list_number = []
word_list = word_list.dropna()
for word in word_list:
number = w2n.word_to_num(word)
list_number.append(number)
df1.loc[~df1.experience.isna(), 'experience'] = list_number
this is my way
@@eternalsgaming2467 dfHiring['experience'] = dfHiring['experience'].apply(lambda x: w2n.word_to_num(x) if isinstance(x,str) else x)
dfHiring['experience'] = dfHiring['experience'].fillna(0)
@@eternalsgaming2467 here you go sir
df.fillna({'experience':'zero','test_score(out of 10)':md},inplace=True)
df.experience = df['experience'].astype(str)
df['experience'] = df['experience'].apply(w2n.word_to_num)
pehle nan values ki jgh zero rakha fir in sabko string format mein change kiya and then word2number library ka use karke un sabko badla
seedha w2n.word_to_num(df.experience) isiliye nhi kiya kyuki w2n ko ek ek value chahiye hoti h rather than a column
hope so aapko samajh aaya ho brother
This video was posted 6 years ago but it's still very helpful and very understandable, when people on TH-cam were talking about linear regression i thought building a model would be very hard but it seems a bit easier and also sir you have an excellent talent to teach harder things to people like me . Thank you very much .
9:00
Now, we can find the predicted price of a house using the values we obtained. We have the equation,
price = m1*area + m2*bedrooms + m3*age + b
Now that we know the coefficients, m1, m2, m3, and the intercept, b, we can find the price.
The given, the values of the three features will give us the predicted price, will be saved in our object variable,
Hey, first of all thank you for the great tutorials.
I'd like to point out one thing. Regression with multiple variables is "Multiple Regression" and not "Multivariate regression", unless we are predicting more than 1 outcome.
Since in the video you are predicting only the price, i.e., only one output, it's "Multiple Regression".
Yes, this video is about univariate multiple linear regression. I am actually looking for multivariate case.. I have a question here that is multivariate case just a repeated method of univariate case i.e. doing univariate iteratively for multiple DVs is equivalent to multivariate case?
I spent half an hr to clear this confusion. Indeed, it is a multiple regression.
Great video. As per my understanding, Linear regression with multiple variables and multivariate regression are two different concepts. Linear regression with multiple variables deals with a single dependent variable and multiple independent variables, while multivariate regression deals with multiple dependent variables.
Thanks so much for this video, worked perfectly. You teach better than most teachers that have ever tried to teach me to code in my life .
Glad it helped meow!
For the exercise, to change the object numbers to int, we can also use the Lambda function as follows:
df.experience = df.experience.map(lambda x:w2n.word_to_num(x))
this snippet is not working throwing an error for using word 2 number file and showing error with word_to_num method
Thanks buddy..👍
@Jai Sharma try this: df.experience=df.experience.apply(w2n.word_to_num)
@@SS-rz6rp still showing same error. i think this is due to NaN. will you pls explain this. i am confused
@@kakumanigayatri5701 what type error?
I spent so many hours trying to find answers and you answered all my questions in the video. Thank you very much! Excellent explanation!
Great to hear Elenie!
Sir u know what is wrong here. When u predict price for area=3000, badroom=3 and age=40 then it will be 44000 (approximately) but when u change the age=15 in this. Then price 100% less then 56000. But your prize is increased in this case which is abnormal.
Can u explain it.
@@jayvardhanjagarwal8973 when the house is older the price of house value decreases.so that is why for area=3000, bedroom=3 and age=40 then predicted price will be 444,400 but when house is bit younger at same other features area=3000, bedroom=3 and age=15, predicted house price is 615,000. Yet i his actual data set for the features area=3000,age-15.bedroom=4, the actual price is 565,000, which is less than his predicted value for a house which is 15 years old,yet 3 bedrooms, as his model has a bit skewness.we cant expect models to be 100% accurate.but when they like over 80% accurate we use such models for our work purposes as they are fairly good models,difficult to get as such 80% or more accuracy
hey did you solve the problem ?? can u please send me the code , I am having problem to change the experience column in string to int
Hi there, i have watched a few of your videos on Pandas and LinearRegression since this morning and I must say, it is very easy to follow you. I appreciate you are not too fast allowing time to catch up. Thanks for the learnings.
You are the best machine learning teacher in TH-cam.
I discovered you so let but i hope i will cover up my project.
10:28
reg.predict(3000, 3, 40)
Here, area = 3000, bedrooms = 3, age = 40. The output is an array of a value:
array([444400.]).
Notice, how this can be manually calculated.
137.25*3000 + -26025*3 + -6825*40 + 383724.99999999983
444399.9999999998 which is approximately equal to
444400.
Brilliant, codebasics
!! Comprehensive. This simplified version of yours is highly commendable.
I like the way you are explaining terms and logic. I realty appreciate your effort. Please share more video like this. Don't stop to make more video on machine learning. keep it up
Soham thanks for the comment, yes I am continuing ml series with deep learning now
@@codebasics very helpful! Thank for the videos and playlist
Just wanted to thank you for your awesome teaching, keep up the good work! From all the content I've seen, yours is the most "hands-on" the perfect combination of theory and exercises applying said theory!
This man teach in very easy way, while I'm so confused with linear and multiple regression, it give me a satisfied answer and rielf so, thanks❤ 😇
The way you are explaining, means you love teaching. I am a teacher, and on the basis of my experience I must say that you should teach in engineering colleges may part time.
sir he is already teaching in colledge
Thank you
The videos are truly excellent! Although I rarely leave comments on educational videos, your concise video series has been incredibly beneficial to me. I appreciate the way you seamlessly integrate teaching with practical coding examples. Keep up the great work
Thank you! Here's a comment to boost your TH-cam algorithm! You deserve it.
Hi,
This works.
First fill the blanks in the experience column with 'zero'
... and then use w2n.word_to_num
df.experience = df.experience.fillna('zero')
df.experience = df.experience.apply(lambda x: w2n.word_to_num(x))
Thanks @Sneha Datta , it helped.
Thanks a lot
from where you got this code - " df.experience = df.experience.apply(lambda x: w2n.word_to_num(x))"
why you have used "lambda x"
it is not given in the original documentation at - pypi.org/project/word2number/
i also checked the word2number official code snippet at github managed by the original contributer "Akshay Nagpal" -- github.com/akshaynagpal/w2n/blob/master/word2number/w2n.py.
This really helped a lot! Thanks :)
Your lectures is so good. At first I faced some problems for the word to number function. Even after installation I write "from word2number import w2n" on my code, but it wasn't work. Then I restart my jupyter notebook & now it is working well. :D
Your videos are saviour and i was trying to learn ML from different sources but still find your tutorials the best. You have nice & crisp explanations. One humble request please upload more videos on ML.
@@codebasics I pray for good health and will wait for more videos..Happy Diwali!!
These courses are soo good i decided to watch every add. Cheers. Thanks bro
Thanks for providing amazing video
Now I got to know about that codebasics is one of the top Indian channel for data science because you were uploading quality video with God explainetion from starting only
I have seen many people they create short video and they just explain very easy concept so that people will feel bored and they will more reach to their channel and video
you explain very clearly sir, really great.
The predicted salary for first candidate is 53205.987
for second guy is 92002.18
Those were the same answers I arrived at.
same answer
How to use the word2number?
These are really amazing video lectures for Machine Learning and start off with. Thank you.
you are genius sir i learnt today many things my institute should watch your videos that how to teach students swiftly..
thanks a lot sir continue helping us...
Coolest personality of Machine Learning Knowledge. Thanx sir. Stay Blessed Always. A lot of prayers for you.
so well explained..the best tutorial in youtube for machine learning..made it so easy to understand
👍😊🙏
The best tutorial all over the web.Using complex math words are not enough and not at all usefull.But explaining practically like you is what we who students want.You are my life saviour.I am trying to find how the coefficients are used to calculate predicted value since yesterday.I ended up here in this awsome tutorial.You got my subscribe and like.And will continue to get so.Thank you soo much
Preetham thanks for the comment. And yes majority of people use fency terms which I hate from the bottom of my heart. My mission on this channel is to break down concepts in easy terms. Happy learning 😊👍
@@codebasics I am glad that i found your channel.I am able to see the difference between the instructor i have in my course i am taking on udemy and you.He just started ML course with linear regression but due to major usage of fancy terms i am unable to understand.
@@codebasics Looking forward to get to learn more from your amazing channel.Please try to make video on Evaluation metrics for regression and classification.Thank you
Only 3 videos in and I've learned a ton. Thank you so much!
Glad to hear that Anthony
exp:2, test:9, interview:6
Answer - 53205.96797671
exp:12, test:10, interview:10
Answer - 92002.18340611
In an actual case in work, there are many columns variables more rows that could run into thousands of rows, close to a hundred columns in which the interaction is not obvious. Agreed the first step is data preparation, data cleansing all NaN, missing rows/column elements given such situation it would better to do a preliminary data exploration by data mining or designed experiment to see what interacts what for what. This is the only time you can actually write out the linear equation actually which are composed of independent variables that either reinforce the prediction (all positive polarity} or that contradict it (all negative polarity).
I agree with you...
In real life data is much more complicated. Specially when we have multiple dependent variables as well instead only one....In real life scenarios thousands of variables (both independent/dependent) interact each other. To create a model for such a scenario is really challenging and benefit of AI can only be realized then....
Thank you SO much for providing this video for free!
This is a great tutorial... I am starting my ML journey and your tutorial helped me learn in an easy way. Thank you
awesome job man you taught me in 10 minutes how to do something my professor couldnt teach me over a couple of lectures
I am happy this was helpful to you.
Thank you very much Sir. Your videos gave an idea how to do use machine learning.
Very helpful and appreciate your way of teaching
I am glad you liked it
Question: Why is the coefficient for the bedroom variable a negative number? Shouldn't more bedrooms make the price higher?
Great lectures.. You teach in one of the finest ways. I really appreciate your hard work and dedication towards these videos.
Thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou thankyou ❤️❤️❤️❤️❤️❤️❤️❤️❤️ watched all videos at a time ....before I feel like don't I understand these topics ..but u made this topic easy 💫❤️
Most welcome 😊 I am happy this was helpful to you.
Your instructions are very clear and easy to follow. It makes learning more easier and stress free.. thanks for helping..
😊🙏
Thank you for the explanation, I have just started with machine learning in Python and it was really helpful.🙏
Just nitpicking being from math background, the value for the field NaN will be min 4, to make sense of the dataset. 😅
In the practice example, you have assigned the 'mean' value instead of the 'median' of the test_score values. That's why, there is a slight deviation in the predicted salaries when compared to the solution, 1) 53205.96 and 2) 92002.18
Thank you for your efforts to explain us all these concepts in a soft way. I really appreciate
Amazing videos!! Can't wait to watch upcoming ones on Machine Learning!
yes
Thanks a lot - really helped me out here. So many videos overcomplicate things, but this was perfect for what I needed!
Thank you very much, sir. Really appreciated. Lots of love from Turkey.
I am happy this was helpful to you.
If your notebook gives warning regarding "no variable for X" then you can train with this type of line. reg.fit(df[['area','bedrooms','age']].values,df.price.values)
include the '.values' and it will be fine.
Solution:
Ex 1: 53713.86677124
Ex 2: 93747.79628651
*Note:* For those, who are getting a slightly different answer. It's because, to replace *missing value* in *column 2* , we have used *mean* here instead of *median*
May I ask why mean is being used instead of median?
@@tanvirahmed849 It depends on the scenario, you will get a hang of it. Once you start practicing. 🙂
another great video, thanks.
I slightly disagree with example setting and how you solved it.
I think that average would be better for test score, not median as in main tutorial with house pricing.
But even assuming that median would be better, you don't have to floor the median in this example, as you did with bedrooms. Obviously, bedrooms cannot be 3.4 or 5.6, but median or average test scores, especially for building an accurate linear model - can and should be.
Thus my answer is slightly different - 53205 and 92002.
Though, it is more art than hard science (average vs median and whether to round the median or not) and your tutorial and example were great, as usual.
PS Did not know about word2number - neat idea. Though they say it should not work with 3.6 i have not had any problems with it.
Good job~ Thank you~ Big hug from China.
I got the missing (NaN) bedroom value for 4. The median of bedroom i am getting is 4 (3, 3, 4, 5, 6). Thank you
Hi Xavier. I had the same issue. I needed to set df.bedrooms = df.bedrooms.fillna(median_bedrooms). When I had the issue you're facing, my code was just df.bedrooms.fillna(median_bedrooms) so i think i was just displaying the correct data set but not actually updating my data set with the correct data. hope it helps.
You can use interpolation method
very good contribution to the learners..Thank you so much..
answer for exercise;reg.predict([[2,9,6]])=array([ 53713.86677124])
reg.predict([[12,10,10]])
=
array([ 93747.79628651]).Thanks for exercise
I got [53205.96797671, 92002.18340611]
Hi sir your explaination style is tooo GOOD!!! here is a request to you that try to add more information into the topic please....
You are really awesome.... Please make more videos..... I can easily understand your tutorial....
How can I make an ANOVA table to better analysis the statistics of this linear regression?
Great Video!
Thank you for this helpful tutorial, I like the way your style,crystal cear and easy to follow.
Dear,
Thanks for your kind words.
Stay in touch for more videos and share our channel if you really find it worth.
@@codebasics why we use median ??? why not mean?? ca i use somthing else instead of median?
Finally got the best machine learning tutorial please upload full machine learning series sir
Thank u
good to hear you liked it Piyush.
you helped me with my final project. huge thanks
Thank you very much Sir. I am going to use this tutorial to handle a contract.
Your explanation is clear and very easy to understand. I am amazed.
And now I am your subscriber. :)
Glad it was helpful!
I corresponded with the @codebasics teacher regarding the results @9:30 for the:
reg.predict([[3000, 3, 15]]) with 3 bedrooms, versus
reg.predict([[3000, 4, 15]]) with 4 bedrooms.
He responded that his updates to his GitHub repository code (URL above) currently generates the correct results:
reg.predict([[3000, 3, 15]]) => 579201.199
reg.predict([[3000, 4, 15]]) => 602590.079
-- Many thanks!
Great
GREAT VIDEO SIR HELPING THOUSANDS
Pls put a video for Data cleaning.. Thank you video, it is easy to understand the concept clearly :)
Thank You Very Much Sir You are saving the lives of lot of students ✨
It would be nice to show the R^2 and which independent variable is effecting the dependent variable the most. This would allow people to know which variable to focus on when buying a house. I’ve never used Panda but it’s a simple line of code in R.
In the solution for the exercise (as given in github), you have taken the mean(for the test score). But the variable is named as "median_test_score". Is it how it is meant to be (I have pasted that part of the code)?
median_test_score = math.floor(d['test_score(out of 10)'].mean())
median_test_score
just found it as well. I guess it is a mistake. He said "median" in the recording as well.
Your all videos are fabulous....Keep it up & thanks for making such a amazing videos....
instead of using external library, we can also use pandas replace method with dict as parameter
word2number = {'zero':0,'one':1,'two':2,'three':3,'four':4,'five':5,'six':6,'seven':7,'eight':8,'nine':9,'ten':10,'eleven':11}
d.replace({"experience": word2number},inplace=True)
Yup that's true. But wordtonumbee can be handy if you have too many labels to map.
excellent video...Please Keep making more videos!!
Hey Vandana,
Thanks for your kind words. Stay in touch for more videos and share our channel if you really find it worth.
Very helpful, very clear! Thank you so much!
I very much like this tutorial. Thank you so much for providing this tutorial. :)
Excellent approach
U saved my time
Glad it helped
Thanks as always for teaching us Sensei
May Christ bless you brother, this has been incredibly helpful.
Actually got the clarity of the topic. Thank you for this video.
what's the mean_square_value you're getting?
sir iam learning from your tutorial your really an amazing teacher.
thank you very much sir
You are most welcome Jan Nisar
sir, you have explained ML in such a easy way..thanks
So far no one had posted data drift and concept drift request you to please explain with the dataset... Thanks . I'm following your channel since 2018.
nice video, it helps a lot for beginner like me, thank you very much :D
Great, this is indeed designed for beginners only.
Helped me so much. You make my understanding about linear regression like liquid.
Glad it was helpful!
Thank you Sir for this excellent video
Your understandable expression was very useful, thank you. By the way, I did not find it logical to fill the empty spaces in experience with median. I found the answers of exercise as follows; 47056 and 88227.
Conversion to integer can also be done by using the map function for experience;
df.experience = df.experience.map ({"two": 2,
"three": 3,
"five": 5,
"loving": 7,
"from": 10,
"eleven": 11})
from word2number import w2n
df.experience = [w2n.word_to_num(x) for x in df.experience]
It can be done in one line. It's useful because if there are 1000 rows, we can't do it by hand.
7:44
reg.coef_
output => array([ 3 coefficients ])
Hey, have you ever done mulvariate multiple regression with several dependent variables (statistics used MANOVA, MANCOVA)? Would like to see a video on that especially explanation of benefits over several ANOVAS.
Heartfelt Thanks for this excellent video series sir.
I have a small doubt. when should we use the following dot(.), [ ], [[ ]]. please clarify.
Very informative video... thank you
Seriously sir its really soooo helpful for me, thank you sir for your hard work for us
Perfect video but we need more exercises in larger datasets, can you provide at least a link or two?Thanks
Thank you so much !!!!!
very easy to learn from your tutorial.
Anyone knows the rationale behind filling zeros for the missing values in the "experience" column? How do we come to an assumption that these candidates have no experience? This newbie appreciates any feedback 😊
Also, Mr Dhaval, I appreciate you taking time to make this tutorial for all of us! I watch all the ads as a way of saying thanks ☺️
Really awesome 😍
Really nice tutorial.
Wonderful tutorial Teach! Would like to know 'how to plot scatter plot from multiple independent variables and one dependent variable', which I think is the only missing piece in the video. Thanks in advance
excellent delivery.