Skip to content

Commit

Permalink
Add files via upload (#98)
Browse files Browse the repository at this point in the history
fix error in random seed
  • Loading branch information
juliagallucci authored Sep 25, 2024
1 parent c4b2fba commit 55a2399
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions 02_activities/assignments/assignment_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -231,17 +231,6 @@
"(iii) A second essential step is to set a random seed. Do so below (Hint: use the random.seed function). Why is setting a seed important? Is the particular seed value important? Why or why not?"
]
},
{
"cell_type": "code",
"execution_count": 59,
"id": "5ef2d5ad",
"metadata": {},
"outputs": [],
"source": [
"# Do not touch\n",
"random.seed(123)"
]
},
{
"cell_type": "markdown",
"id": "f0676c21",
Expand All @@ -262,15 +251,15 @@
},
{
"cell_type": "code",
"execution_count": 31,
"id": "78a88a6e",
"execution_count": null,
"id": "72c101f2",
"metadata": {},
"outputs": [],
"source": [
"# Do not touch\n",
"np.random.seed(123)\n",
"# Create a random vector of True and False values to split the data\n",
"split = np.random.choice([True, False], size=len(predictors_standardized), replace=True, p=[0.75, 0.25])\n",
"\n",
"# Your code here..."
"split = np.random.choice([True, False], size=len(predictors_standardized), replace=True, p=[0.75, 0.25])"
]
},
{
Expand Down

0 comments on commit 55a2399

Please sign in to comment.