Skip to content

Commit

Permalink
modify file paths for windows
Browse files Browse the repository at this point in the history
rasbt committed Nov 6, 2019
1 parent 9ebab87 commit b281ad5
Showing 4 changed files with 82 additions and 54 deletions.
69 changes: 41 additions & 28 deletions ch02/ch02.ipynb

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions ch02/ch02.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@


import numpy as np
import os
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
@@ -22,7 +23,15 @@



# *The use of `watermark` is optional. You can install this IPython extension via "`pip install watermark`". For more information, please see: https://github.com/rasbt/watermark.*
# *The use of `watermark` is optional. You can install this Jupyter extension via*
#
# conda install watermark -c conda-forge
#
# or
#
# pip install watermark
#
# *For more information, please see: https://github.com/rasbt/watermark.*

# ### Overview
#
@@ -158,10 +167,15 @@ def predict(self, X):



df = pd.read_csv('https://archive.ics.uci.edu/ml/'
'machine-learning-databases/iris/iris.data',

s = os.path.join('https://archive.ics.uci.edu', 'ml',
'machine-learning-databases', 'iris','iris.data')
print('URL:', s)

df = pd.read_csv(s,
header=None,
encoding='utf-8')

df.tail()


44 changes: 22 additions & 22 deletions ch12/ch12.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion ch12/ch12.py
Original file line number Diff line number Diff line change
@@ -124,7 +124,7 @@
else:
writemode = 'w'

zipped_mnist = [f for f in os.listdir('./') if f.endswith('ubyte.gz')]
zipped_mnist = [f for f in os.listdir() if f.endswith('ubyte.gz')]
for z in zipped_mnist:
with gzip.GzipFile(z, mode='rb') as decompressed, open(z[:-3], writemode) as outfile:
outfile.write(decompressed.read())
@@ -561,6 +561,7 @@ def fit(self, X_train, y_train, X_valid, y_valid):




plt.plot(range(nn.epochs), nn.eval_['cost'])
plt.ylabel('Cost')
plt.xlabel('Epochs')

0 comments on commit b281ad5

Please sign in to comment.