INNER CODE UNIT · Python

optm

adminho/trading-stock-thailand · LSTM_predict_trend.py:68

	optm=RMSprop(lr=0.001, rho=0.9, epsilon=1e-08, decay=0.0001)	
	start = time.time()
	# algorithim to train models use
	# compute loss with function: binary_crossentropy or loss crossentropy (Also known as logloss)
	model.compile(optimizer=optm,
			  loss='binary_crossentropy',
			  metrics=['accuracy'])

	sec = datetime.timedelta(seconds=int(time.time() - start))			  
	print ("Compilation Time : ", str(sec))	
	return model

def trainModel(symbolName, Xtrain, Ytrain, Xtest, Ytest, epochs):
	history = his.TrainingHistory()
	h5_file = os.path.join(MODEL_PATH,'%s_weights.h5' % (symbolName))
	json_file = os.path.join(MODEL_PATH,'%s_structure.json' % (symbolName))
	
	global_start_time = time.time()	

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…