未验证 提交 a7998b7b 编写于 作者: O O2Dyokii 提交者: GitHub

Update DCN.py

上级 7cd639c1
...@@ -129,6 +129,7 @@ def preprocessing(data): ...@@ -129,6 +129,7 @@ def preprocessing(data):
if __name__ == "__main__": if __name__ == "__main__":
#data from kaggle forest cover type dataset
data = pd.read_csv("data/covtype.csv") data = pd.read_csv("data/covtype.csv")
X, y, inp_layer, inp_embed = feature_generate(data) X, y, inp_layer, inp_embed = feature_generate(data)
...@@ -137,4 +138,4 @@ if __name__ == "__main__": ...@@ -137,4 +138,4 @@ if __name__ == "__main__":
test_index = list(set(range(X.shape[0])) - set(train_index)) test_index = list(set(range(X.shape[0])) - set(train_index))
model = fit(inp_layer, inp_embed, X.iloc[train_index], y[train_index, :]) model = fit(inp_layer, inp_embed, X.iloc[train_index], y[train_index, :])
evaluate(X.iloc[test_index], y[test_index, :], model) evaluate(X.iloc[test_index], y[test_index, :], model)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册