def main(epochs):
    xTrain, yTrain, xTest, yTest, scaler = createInputs(factors=False)
    results, yPred = run(epochs, 2, xTrain, yTrain, xTest, yTest)
    results['unscaledMse'] = mean_squared_error(
        scaler.inverse_transform(yTest.reshape((-1, 1))),
        scaler.inverse_transform(yPred.reshape((-1, 1))))
    saveResults("LSTM-ROLLING-FACTORS", epochs, 2, results)
def main(epochs):
    xTrain, yTrain, xTest, yTest, scaler = createInputs(factors=False,
                                                        type='dense')
    results, yPred = run(epochs, 3, xTrain, yTrain, xTest, yTest)
    results['unscaledMse'] = mean_squared_error(
        scaler.inverse_transform(yTest.reshape((-1, 1))),
        scaler.inverse_transform(yPred))
    saveResults("DENSE-NOROLLING-NOFACTORS", epochs, 3, results)
def main(epochs):
    xTrain, yTrain, xTest, yTest, scaler = createInputs(factors=False,
                                                        tripleBarrier=True)
    yTrainBinary = to_categorical(yTrain)
    yTestBinary = to_categorical(yTest)
    results, yPred, model = run(epochs, 1, xTrain, yTrainBinary, xTest,
                                yTestBinary)
    saveResults("LSTM-NOFACTORS-TRIPLEBARRIER", epochs, 2, results)