Great Video! I am getting RuntimeWarning: divide by zero encountered in double_scalars vif = 1. / (1. - r_squared_i). I am able to see VIF values for only a few independent variables
Good question Neeraj. Whenever u get the input data from front end, it should pass through feature engineering pipeline before prediction. That logic you should apply before calling "prediction"
Sir, i have used VIF after using standard scaler . I found very less values . Is this right way to use scaling of input parameters before calculating VIF
why do we use vif ?if we can eliminate features by some feature selection techniques like mutual_info_regress,pca,p-value ......????????????please reply
hi aman, your videos are very informative and unique. Nice work. Keep going. I tried to install statsmodels using pip install statsmodels but dint get variance inf fac in that could you help me how to go ahead..?
Thanks very much, can you please explain (the code) why we add [ ] to variance_inflation_factor(dataset.values,i) for i in range (dataset.values.shape[1]) ?? I can't seem to understand
cause it is a list comprehension. you must have solved this.. [i for i in list if i%2==0].. (which gives all even number present inside the '"list").... google it
Hello, I'm getting an error "ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe" when I run this for my data. Any thoughts on what could have caused this? Much appreciated.
sir, do we need adding constant to calculate vif? bcs in stackoverflow i saw an article that we have to add constant, and now im confused which one is correct
sir could you please try it in our traditional way without using variance_inflation_factor i tried many times but the are not matching at all i used this below code on some other dataset, what is wrong in this.. for i in features:
@@UnfoldDataScience we calculate VIF directly using the function. My problem was that i tried this VIF by writing whole code for VIF myself instead of using function directly. i was not able to do that. I got error
Great Video! I am getting RuntimeWarning: divide by zero encountered in double_scalars
vif = 1. / (1. - r_squared_i). I am able to see VIF values for only a few independent variables
Really helpful video
thanks a lot
Parabéns pelo seu Vídeo. Gostei. 👏👏👏👏
keep it up, good concepts coming
Thanks a lot
As always, very good explanation with simple example and relate to the real-time work..thanks a lot
finished watching
Dear sir,I have one question like you have create one new variable from year_old and swiggy_rating,How to handle this in front end for prediction??
Good question Neeraj. Whenever u get the input data from front end, it should pass through feature engineering pipeline before prediction. That logic you should apply before calling "prediction"
Very nice one! Thank you!!
Thanks for your positive feedback 🙂
Sir, i have used VIF after using standard scaler . I found very less values . Is this right way to use scaling of input parameters before calculating VIF
hi ,can u pls make tutorial with pyhton code for IV-score analysis & weight of evidence??
why do we use vif ?if we can eliminate features by some feature selection techniques like mutual_info_regress,pca,p-value ......????????????please reply
why exactly did you multiple the year and rating column tho ?
Can you please explain Why do you prefer multiplication operation on rating and year?
I did not get this question. Which part of the video.
Hello sir.. very informative video.. why did we do product of rating and year?
And also what should be the value of vif so that it is acceptable?
Below 5, a normal standard
@@UnfoldDataScience thanks and what about the product?
Why did you multiply rating and year at 7:13 . Is there any significance or you have randomly multiplied them?
Hi Nihar, a new variable for demonstration purpose.
Sir please make a video on how data science work actually done in a office.How they perform tasks. Means first to last how a work is done in a office.
Ok Rafsun.
hi aman, your videos are very informative and unique. Nice work. Keep going.
I tried to install statsmodels using pip install statsmodels but dint get variance inf fac in that could you help me how to go ahead..?
statsmodels.stats.outliers_influence.variance_inflation_factor
@@UnfoldDataScience Got it. Thanks Aman!
Thank you for your video. Does this apply to classification problems as well? Is the process different in classification problems?
It is application to Logistic regression - not other algorithms, basically linear models.
@@UnfoldDataScience Thank you! So how do you detect and remove multicollinearity in categorical problems?
Thanks very much, can you please explain (the code) why we add [ ] to variance_inflation_factor(dataset.values,i) for i in range (dataset.values.shape[1]) ?? I can't seem to understand
cause it is a list comprehension. you must have solved this.. [i for i in list if i%2==0].. (which gives all even number present inside the '"list").... google it
The " must to know topics" code and datasets is not present in google drive.Can you please sent the link for valuable practice
Ok I ll check.
where can i get the code and the dataset??????????
Hello, I'm getting an error "ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe" when I run this for my data. Any thoughts on what could have caused this? Much appreciated.
stackoverflow.com/questions/40809503/python-numpy-typeerror-ufunc-isfinite-not-supported-for-the-input-types
sir, do we need adding constant to calculate vif? bcs in stackoverflow i saw an article that we have to add constant, and now im confused which one is correct
Vif formula is same everywhere.
Could you give me the stack overflow link you are talking abt,
Sir, calculate_vif is showing as undefined. I have imported vif as shown in the video, still I am getting this error.
Hi Laxman, due to version difference it might be happening, check your sklearn version and find the equivalent function for VIF.
when i call the function 'calculate_vif(features)'
i get this as an error 'TypeError: '(slice(None, None, None), 0)' is an invalid key'
please help.
may be function name is changed in new sklearn,
sir could you please try it in our traditional way without using variance_inflation_factor
i tried many times but the are not matching at all
i used this below code on some other dataset, what is wrong in this..
for i in features:
x=X_train.drop(i,axis=1)
# print(x)
Y=X_train[i]
# print(Y)
x_sm=sm.add_constant(x)
lr=sm.OLS(Y,x_sm).fit()
Y_pred=lr.predict(x_sm)
r2=r2_score(Y,Y_pred)
VIF=1/(1-r2)
print('r2=',r2)
print('VIF=',VIF)
What is the issue i did not get.
@@UnfoldDataScience we calculate VIF directly using the function.
My problem was that i tried this VIF by writing whole code for VIF myself instead of using function directly. i was not able to do that. I got error
Send me your mail ID there i'll send u the pic of the issue.
Xxxxiii
Hii, Can you please provide the link to download dataset (RestaurentData.xlsx) so that I can compare the results. Thank you.
drive.google.com/drive/folders/1XdPbyAc9iWml0fPPNX91Yq3BRwkZAG2M