Created
February 13, 2018 02:02
-
-
Save mosluce/9ab9d19911b7c56de853a385c3f8083b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.models import Sequential | |
from keras.layers import Dense | |
import numpy | |
numpy.random.seed(7) | |
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",") | |
# 因為不太懂這樣的用法,所以用下面的程式來實驗... | |
X = dataset[:,0:8] | |
Y = dataset[:,8] | |
d = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9]] | |
# 下面這行出錯 | |
d1 = d[:,0:3] | |
# 這行也是 | |
d2 = d[:,3] | |
print(d1) | |
print(d2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment