Beispiel #1
0
def getTestData():
    testingData = utl.readDataSetAsMatrix(\
     utl.CURRENCY_EXCHANGE_TESTING_FILE(\
      utl.SAMPLING_TYPE.HOURLY
     )
    )

    width = utl.HOURLY_WIDTH
    inputs = utl.createPattern(testingData[:-1, 2:], width)
    outputs = testingData[(width + 1):, 2:]

    return inputs, outputs
Beispiel #2
0
def evaluate(model, debug = True, inputs = None, outputs = None):
	
	if inputs is None or outputs is None:
		# Reading testing data
		testingData = utl.readDataSetAsMatrix(\
			utl.CURRENCY_EXCHANGE_TESTING_FILE(\
				utl.SAMPLING_TYPE.HOURLY
			)
		)

		width = utl.HOURLY_WIDTH
		inputs = utl.createPattern(testingData[:-1, 2:], width)
		outputs = testingData[(width+1):, 2:]
	
	return utl.evaluateRegressionModel(\
		model,
		inputs,
		outputs,
		"MLP : Currency exchange problem 'hourly'",
		debug
	)
Beispiel #3
0
def evaluate(model, debug = True, inputs = None, outputs = None):
	
	if inputs is None or outputs is None:
		# Reading testing data
		testingData = utl.readDataSetAsMatrix(\
			utl.CURRENCY_EXCHANGE_TESTING_FILE(\
				utl.SAMPLING_TYPE.AT_CLOSING_DAY
			)
		)

		inputs = testingData[:-1, 2:]
		outputs = testingData[1:, 2:]

	

	return utl.evaluateRegressionModel(\
		model,
		inputs,
		outputs,
		'RNN Jordan : Currency exchange problem',
		debug
	)