Skip to content

Commit

Permalink
wrap up ch8
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Dec 5, 2019
1 parent e250ac5 commit 9a54bce
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 34 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ ch12/t10k-labels-idx1-ubyte.gz
ch12/train-images-idx3-ubyte.gz
ch12/train-labels-idx1-ubyte.gz

# Ch18 data files
ch08/aclImdb/
ch08/aclImdb_v1.tar.gz
ch08/movie_data.csv

# Other
*checkpoint
*tfevents*
*.data-00000-of-00001
Expand Down
2 changes: 1 addition & 1 deletion ch08/ch08.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@
"y = [np.random.randint(3) for i in range(25)]\n",
"X = (y + np.random.randn(25)).reshape(-1, 1)\n",
"\n",
"cv5_idx = list(StratifiedKFold(n_splits=5, shuffle=False, random_state=0).split(X, y))\n",
"cv5_idx = list(StratifiedKFold(n_splits=5, shuffle=False).split(X, y))\n",
" \n",
"lr = LogisticRegression(random_state=123, multi_class='ovr', solver='lbfgs')\n",
"cross_val_score(lr, X, y, cv=cv5_idx)"
Expand Down
Loading

0 comments on commit 9a54bce

Please sign in to comment.