# Week3 assignment plot\_decision\_boundary

**URL:** <https://community.deeplearning.ai/t/week3-assignment-plot-decision-boundary/129197>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [May 18, 2022, 4:48pm UTC](https://community.deeplearning.ai/t/week3-assignment-plot-decision-boundary/129197 "2022-05-18T16:48:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_Mohammad\_Ne](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Mohammad\_Mohammad\_Ne](https://community.deeplearning.ai/u/Mohammad_Mohammad_Ne)\
**Post date:** [May 18, 2022, 4:48pm UTC](https://community.deeplearning.ai/t/week3-assignment-plot-decision-boundary/129197/1 "2022-05-18T16:48:49Z")

</div>

I would like to understand this line of code  
I know it makes a plot, but could you please give me a more specific explination?  
Thank you

plot\_decision\_boundary(lambda x: predict(parameters, x.T), X, Y)

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [May 18, 2022, 4:58pm UTC](https://community.deeplearning.ai/t/week3-assignment-plot-decision-boundary/129197/2 "2022-05-18T16:58:30Z")

</div>

You can find the source code for the function _plot\_decision\_boundary_ by clicking “File → Open” and then opening the file _planar\_utils.py_. The way to have figured that out would be to examine the “import” cell early in the notebook. There is a topic about how to view utility functions on the [DLS FAQ Thread](https://community.deeplearning.ai/t/faq-frequently-asked-questions-for-all-dls-courses/74).

Also note that the invocation of that function passed a python “lambda function” as the first argument. You can pass references to functions as parameters to a python function. Google “python lambda function” to learn more about how those work.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Mohammad\_Ne](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@Mohammad\_Mohammad\_Ne](https://community.deeplearning.ai/u/Mohammad_Mohammad_Ne)\
**Post date:** [May 18, 2022, 7:40pm UTC](https://community.deeplearning.ai/t/week3-assignment-plot-decision-boundary/129197/3 "2022-05-18T19:40:47Z")

</div>

Thank you very much 🙂
