The purpose of calculating the Cost Function with Gradient Descent by hand

Hello there,

I would ask for your assistance on the below.

Am I correct that when fitting a linear or regression model using a software, such as python, the process of minimising the cost function by using gradient descent is implemented by the software anyways.

If that’s correct, is there any purpose of construction the cost function “by hand” once the model is fitted?

Thanks in advance.

1 Like

In general you will never need to do that by hand, the purpose of learning the fundamental is to gain intuition about why and how things work, which is usually the most difficult part, also help you to see and identify shen things are not implemented correctly

I hope this helps

1 Like

Thanks, it’s very helpful.

1 Like

It depends on what tools are available on the platform you are using.

  • If you have access to tools like TensorFLow or sklearn, then it can provide a lot of the methods.

  • If you have to implement the optimization yourself, or are using a minimal platform, then you need the low-level processing skills.