Created using Colab
This commit is contained in:
@@ -236,11 +236,10 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Let's double check we get the right answer before proceeding\n",
|
||||
"print(\"Correct answer = %3.3f, Your answer = %3.3f\"%(0.2,categorical_distribution(np.array([[0]]),np.array([[0.2],[0.5],[0.3]]))))\n",
|
||||
"print(\"Correct answer = %3.3f, Your answer = %3.3f\"%(0.5,categorical_distribution(np.array([[1]]),np.array([[0.2],[0.5],[0.3]]))))\n",
|
||||
"print(\"Correct answer = %3.3f, Your answer = %3.3f\"%(0.3,categorical_distribution(np.array([[2]]),np.array([[0.2],[0.5],[0.3]]))))\n",
|
||||
"\n"
|
||||
"# Here are three examples\n",
|
||||
"print(categorical_distribution(np.array([[0]]),np.array([[0.2],[0.5],[0.3]])))\n",
|
||||
"print(categorical_distribution(np.array([[1]]),np.array([[0.2],[0.5],[0.3]])))\n",
|
||||
"print(categorical_distribution(np.array([[2]]),np.array([[0.2],[0.5],[0.3]])))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -460,4 +459,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user