MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / getKaggleMNIST

Function getKaggleMNIST

unsupervised_class2/util.py:21–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19
20
21def getKaggleMNIST():
22 # MNIST data:
23 # column 0 is labels
24 # column 1-785 is data, with values 0 .. 255
25 # total size of CSV: (42000, 1, 28, 28)
26 train = pd.read_csv('../large_files/train.csv').values.astype(np.float32)
27 train = shuffle(train)
28
29 Xtrain = train[:-1000,1:] / 255
30 Ytrain = train[:-1000,0].astype(np.int32)
31
32 Xtest = train[-1000:,1:] / 255
33 Ytest = train[-1000:,0].astype(np.int32)
34 return Xtrain, Ytrain, Xtest, Ytest
35
36
37def init_weights(shape):

Callers 15

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
test_pretraining_dnnFunction · 0.90
test_single_autoencoderFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
pca_impl.pyFile · 0.90
gaussian_nb.pyFile · 0.90

Calls

no outgoing calls

Tested by 3

test_pretraining_dnnFunction · 0.72
test_single_autoencoderFunction · 0.72
test_single_autoencoderFunction · 0.72