Figure 1

"
]
},
{
"cell_type": "markdown",
"id": "4388dbd7",
"metadata": {},
"source": [
"#### Instructions: Implement the sigmoid function\n",
"* You will want this function to work if z is a scalar as well as if it is an array."
]
},
{
"cell_type": "markdown",
"id": "08648884",
"metadata": {},
"source": [
" \n",
"## \n",
" **Hints**\n",
"

\n",
"

\n", "

- \n",
"
- numpy.exp \n", "\n", "

\n",
"## \n",
" **Hints**\n",
"

\n",
"

\n", "

- \n",
"
- use numpy.dot for matrix multiplication. \n", "
- To ensure that the fraction -1/m is a decimal value, cast either the numerator or denominator (or both), like `float(1)`, or write `1.` for the float version of 1. \n", "

\n",
"## \n",
" **Hints**\n",
"

\n",
"

\n", "

- \n",
"
- Make sure you handle cases when the (word, label) key is not found in the dictionary. \n", "
- Search the web for hints about using the 'get' function of a Python dictionary. Here is an example \n", "

\n",
"## \n",
" **Hints**\n",
"

\n",
"

\n", "

- \n",
"
- Use np.asarray() to convert a list to a numpy array \n", "
- Use numpy.squeeze() to make an (m,1) dimensional array into an (m,) array \n", "