VIF Application in Python | VIF In python | Variance Inflation Factor In Python

Поделиться
HTML-код
  • Опубликовано: 30 ноя 2024

Комментарии • 51

  • @faeezaroos3236
    @faeezaroos3236 2 года назад +2

    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

  • @prateeksachdeva1611
    @prateeksachdeva1611 2 года назад

    Really helpful video

  • @ayseljafarzade1076
    @ayseljafarzade1076 15 дней назад

    thanks a lot

  • @valeuler
    @valeuler 2 года назад

    Parabéns pelo seu Vídeo. Gostei. 👏👏👏👏

  • @dorgeswati
    @dorgeswati 3 года назад +1

    keep it up, good concepts coming

    • @UnfoldDataScience
      @UnfoldDataScience  3 года назад

      Thanks a lot

    • @333razesh
      @333razesh 3 года назад

      As always, very good explanation with simple example and relate to the real-time work..thanks a lot

  • @sandipansarkar9211
    @sandipansarkar9211 3 года назад

    finished watching

  • @CosmicTrisha
    @CosmicTrisha 2 года назад +1

    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??

    • @UnfoldDataScience
      @UnfoldDataScience  2 года назад

      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"

  • @gouthamansaravanan7692
    @gouthamansaravanan7692 2 года назад

    Very nice one! Thank you!!

  • @ManishSingh-qp8vl
    @ManishSingh-qp8vl 2 года назад +1

    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

  • @vtechguruG
    @vtechguruG Год назад

    hi ,can u pls make tutorial with pyhton code for IV-score analysis & weight of evidence??

  • @sivachaitanya6330
    @sivachaitanya6330 2 года назад

    why do we use vif ?if we can eliminate features by some feature selection techniques like mutual_info_regress,pca,p-value ......????????????please reply

  • @ayesha11261
    @ayesha11261 5 месяцев назад

    why exactly did you multiple the year and rating column tho ?

  • @pragatishinde3688
    @pragatishinde3688 3 года назад

    Can you please explain Why do you prefer multiplication operation on rating and year?

    • @UnfoldDataScience
      @UnfoldDataScience  3 года назад

      I did not get this question. Which part of the video.

  • @musicalhearts0106
    @musicalhearts0106 Год назад

    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?

  • @niharkashyap3897
    @niharkashyap3897 3 года назад

    Why did you multiply rating and year at 7:13 . Is there any significance or you have randomly multiplied them?

  • @rafsunahmad4855
    @rafsunahmad4855 3 года назад

    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.

  • @ishtigokak3526
    @ishtigokak3526 3 года назад +1

    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..?

    • @UnfoldDataScience
      @UnfoldDataScience  3 года назад

      statsmodels.stats.outliers_influence.variance_inflation_factor

    • @ishtigokak3526
      @ishtigokak3526 3 года назад

      @@UnfoldDataScience Got it. Thanks Aman!

  • @response2u
    @response2u 2 года назад

    Thank you for your video. Does this apply to classification problems as well? Is the process different in classification problems?

    • @UnfoldDataScience
      @UnfoldDataScience  2 года назад +1

      It is application to Logistic regression - not other algorithms, basically linear models.

    • @response2u
      @response2u 2 года назад

      @@UnfoldDataScience Thank you! So how do you detect and remove multicollinearity in categorical problems?

  • @mmarva3597
    @mmarva3597 3 года назад

    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

    • @abhinavkale4632
      @abhinavkale4632 3 года назад

      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

  • @sandipansarkar9211
    @sandipansarkar9211 3 года назад

    The " must to know topics" code and datasets is not present in google drive.Can you please sent the link for valuable practice

  • @sivachaitanya6330
    @sivachaitanya6330 2 года назад

    where can i get the code and the dataset??????????

  • @MadhumithaN
    @MadhumithaN 2 года назад

    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.

    • @UnfoldDataScience
      @UnfoldDataScience  2 года назад

      stackoverflow.com/questions/40809503/python-numpy-typeerror-ufunc-isfinite-not-supported-for-the-input-types

  • @alfathterry7215
    @alfathterry7215 3 года назад

    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

    • @UnfoldDataScience
      @UnfoldDataScience  3 года назад +1

      Vif formula is same everywhere.
      Could you give me the stack overflow link you are talking abt,

  • @laxmanbisht2638
    @laxmanbisht2638 3 года назад

    Sir, calculate_vif is showing as undefined. I have imported vif as shown in the video, still I am getting this error.

    • @UnfoldDataScience
      @UnfoldDataScience  3 года назад

      Hi Laxman, due to version difference it might be happening, check your sklearn version and find the equivalent function for VIF.

  • @montegukh7907
    @montegukh7907 2 года назад

    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.

  • @amolkabugade3728
    @amolkabugade3728 3 года назад

    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)

    • @UnfoldDataScience
      @UnfoldDataScience  3 года назад +1

      What is the issue i did not get.

    • @amolkabugade3728
      @amolkabugade3728 3 года назад

      @@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

    • @amolkabugade3728
      @amolkabugade3728 3 года назад

      Send me your mail ID there i'll send u the pic of the issue.

  • @mohammadumar6536
    @mohammadumar6536 2 года назад

    Xxxxiii

  • @umamaheswariyarlagadda9033
    @umamaheswariyarlagadda9033 2 года назад

    Hii, Can you please provide the link to download dataset (RestaurentData.xlsx) so that I can compare the results. Thank you.

    • @UnfoldDataScience
      @UnfoldDataScience  2 года назад

      drive.google.com/drive/folders/1XdPbyAc9iWml0fPPNX91Yq3BRwkZAG2M