# Supervised learning

**URL:** <https://community.deeplearning.ai/t/supervised-learning/226307>\
**Category:** Supervised ML: Regression and Classification\
**Tags:** week-module-1\
**Created:** [November 3, 2022, 8:03pm UTC](https://community.deeplearning.ai/t/supervised-learning/226307 "2022-11-03T20:03:47Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Christian\_Simonis](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/christian_simonis/32/142583_2.png) [@Christian\_Simonis](https://community.deeplearning.ai/u/Christian_Simonis)\
**Post date:** [November 4, 2022, 8:44pm UTC](https://community.deeplearning.ai/t/supervised-learning/226307/7 "2022-11-04T20:44:19Z")

</div>

Hi there,

I suggest you take a look at the course content again since the underlying concepts are explained really well. And they are important to understand since several future concepts will build upon these basics.

A cost function provides a metric you can use to improve your optimization. When fitting a model you actually want to minimise the costs, (the model error). See also:

- [https://towardsdatascience.com/cost-functions-the-underpinnings-of-machine-learning-549ac5edb211](https://towardsdatascience.com/cost-functions-the-underpinnings-of-machine-learning-549ac5edb211)

Gradient descent is a powerful method for above mentioned optimization when fitting your model. It is really well explained by Andrew Ng in this video:

- [Gradient Descent (C1W2L04) - YouTube](https://youtu.be/uJryes5Vk1o)

Also this thread might be interesting for you:

- [How different initialization of centroids of K-means results in drastic different clusters ? They all share common cost function - #5 by Christian\_Simonis](https://community.deeplearning.ai/t/how-different-initialization-of-centroids-of-k-means-results-in-drastic-different-clusters-they-all-share-common-cost-function/223900/5)

Best  
Christian

---

_[View the full topic](https://community.deeplearning.ai/t/supervised-learning/226307)._
