将CSV特征解析为ANN的Tensorflow

我正在尝试计算如何正确地将数据从CSV转换为张量流。 我已经确定了两个特征列1.Area&2.Date,输出将预测一个值。

我有大约10,000行数据。 我正在使用熊猫在训练和测试数据中分割数据。

# Read Csv Data for training
df = pd.read_csv('CultivatedSask.csv',encoding='latin1')
X, y = df.iloc[:,1:3],df.iloc[:,:1]

X_train, X_test, y_train, y_test = 
train_test_split(X,y,test_size=0.2,random_state=1)
X_train = X_train.as_matrix()
X_test = X_test.as_matrix()
y_train = y_train.as_matrix()
y_test = y_test.as_matrix()

这些是变量的形状X_train =(2232,2)X_test =(559,2)y_train =(2232,1)y_test =(559,1)

数据看起来像是10,000,2015,100,000美元

我们的目标是正确地为我的输入节点获取正确的形状/格式的数据,这些占位符将成为占位符。

链接地址: http://www.djcxy.com/p/32115.html

上一篇: Parsing CSV Features into Tensorflow for ANN

下一篇: How to improve digit recognition prediction in Neural Networks in Matlab?