Commit 4e8b12ca authored by Sushant Mahajan's avatar Sushant Mahajan

final touches

parent c7fd8558
Pipeline #320 skipped
......@@ -142,7 +142,7 @@ if __name__ == "__main__":
tX,ty = getData("TestX.csv",isTrain=False)
model = {}
model = {'li':X.shape[1]-1,'lh':int(33*(X.shape[1]-1)/20),'lo':2,'lambda':0.1,'eta':[0.01,0.03,0.06,0.1,0.2]}
model = {'li':X.shape[1]-1,'lh':int(1.65*(X.shape[1]-1)),'lo':2,'lambda':0.1,'eta':[0.01,0.03,0.06,0.1,0.2]}
# model['w1'] = np.random.randn(model['li']+1, model['lh'])/np.sqrt(model['li']+1) #58x28
# model['w2'] = np.random.randn(model['lh']+1, model['lo'])/np.sqrt(model['lh']+1) #29x2
model['w1'] = np.random.rand(model['li']+1, model['lh'])*0.24 - 0.12
......@@ -167,7 +167,7 @@ if __name__ == "__main__":
# acc = m-np.sum(abs(np.array(py)-np.array(y2)))
# print(h, acc*100/m)
with open("answer.txt","w") as wfile:
with open("output.txt","w") as wfile:
writer = csv.writer(wfile)
writer.writerow(['Id','Label'])
for i,ans in enumerate(py):
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment