How to Implement Multiple Linear Regression in Python From Scratch

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 32

  • @GregHogg
    @GregHogg  Рік тому

    Take my courses at mlnow.ai/!

  • @kreativeworld2073
    @kreativeworld2073 2 роки тому +25

    I would prefer not using the word "from scratch" in the title of the videos as this video is not for newbies to the ML who want to code linear regression model and you are using build in one....

  • @lewismurigi3623
    @lewismurigi3623 6 місяців тому

    @GregHogg Thank you Sir. You have really helped me to do my Exam today. More Blessing Sir

  • @zsnowboardern9332
    @zsnowboardern9332 11 місяців тому

    i am confused. why do we want to do complicated things when we can do simple things please send me your thoughts. this video is great with all the explanations

  • @aondonguaddai1207
    @aondonguaddai1207 2 роки тому +2

    Awesome, I am having a challenge, after running the last part of the code (sklearn_model = LinearRegression().fit(X_train,y_train)
    sklearn_y_prediction = sklearn_model.predict(X_train)
    it keeps on giiving me this error ()
    sklearn_y_prediction.shape)
    (Input contains NaN, infinity or a value too large for dtype('float64').
    I have checked to see if the are any NaN values but there are none

    • @GregHogg
      @GregHogg  2 роки тому +1

      Have you made sure of this by removing all of the null rows in the data frame with df = df.dropna()?

    • @aondonguaddai1207
      @aondonguaddai1207 2 роки тому

      @@GregHogg Yes just did and it works fine now. thanks.

    • @GregHogg
      @GregHogg  2 роки тому +1

      @@aondonguaddai1207 Awesome

  • @hannukoistinen5329
    @hannukoistinen5329 Рік тому

    If you want to be a Data Scientist in Python, forget it!! R is the tool for REAL data science/analytics!

  • @LostGirlAt22
    @LostGirlAt22 Рік тому

    Thank you so much for this video

  • @dr.satyendrasingh5576
    @dr.satyendrasingh5576 Рік тому

    Awesome video... thanks👍

  • @arsheyajain7055
    @arsheyajain7055 2 роки тому +1

    Awesome!!!

  • @relaxingsounds604
    @relaxingsounds604 6 місяців тому

    if i have a sample (e.g., ftse100) and I have 10 years worth of data for each of my variables:
    do i need to do 10 separate regressions (for each year); or, take average (of yearly data points) over 10 years and do a single one.
    OR, could I somehow do a single regression whilst including all data points ??

  • @PoorvaSharma-t4l
    @PoorvaSharma-t4l 2 місяці тому

    from where can i access the dataset

  • @zhengyangfei5599
    @zhengyangfei5599 Рік тому

    Here, we manually checked the correlation and eliminated those that are not significant. Is there any way to implement an algorithm that does it for us?

    • @GregHogg
      @GregHogg  Рік тому

      Yeah there's an algorithm for everything really haha

  • @anthonychung2907
    @anthonychung2907 Рік тому

    what to do if the x-axis is time series ?

  • @MrGatward
    @MrGatward Рік тому

    So is it true that f(x1, x2, x3) = p1x1 + p2x2 + p3x3 where pi is the ith value of the prediction model?

    • @MrGatward
      @MrGatward Рік тому

      And how do you know what pi is? Thanks

  • @damirzhanzakov
    @damirzhanzakov 16 днів тому

    brother this is not from scratch

  • @faisalsal1
    @faisalsal1 9 місяців тому +2

    Jump to 1:49 to skip bla bla bla ...

  • @amoghmbabu6507
    @amoghmbabu6507 2 роки тому

    great video !!!

    • @GregHogg
      @GregHogg  2 роки тому

      Thank you.

    • @polusanisriman8424
      @polusanisriman8424 Рік тому

      @@GregHogg Your video is misleading.. From scratch means building regressor object which can do normalization, gradient descent, predict values from answer, accuracy visualization etc etc using Numpy and Matplotlib. EQUATIONS!!!!

  • @deepeshjha9502
    @deepeshjha9502 5 місяців тому +1

    Bro ruined the whole video just by importing the model.

    • @GregHogg
      @GregHogg  5 місяців тому

      Looking back on this video, I completely 100% agree. I think I forgot in the middle that I was supposed to do that part in numpy

  • @tiagosilva856
    @tiagosilva856 Рік тому

    where is the dataframe?

    • @jacklinetum5460
      @jacklinetum5460 Рік тому

      Hi , Check on the spelling of dataframe. It should be DataFrame. Not Dataframe