Example #1
0
            sequential=sequential[i],
        )
        """ Format Training and Testing Set """
        open_train_X, open_test_X, open_train_y, open_test_y = HF.get_normalized_training_test_set(
            open_, rnn.past_n_, test_size)
        high_train_X, high_test_X, high_train_y, high_test_y = HF.get_normalized_training_test_set(
            high_, rnn.past_n_, test_size)
        low_train_X, low_test_X, low_train_y, low_test_y = HF.get_normalized_training_test_set(
            low_, rnn.past_n_, test_size)
        close_train_X, close_test_X, close_train_y, close_test_y = HF.get_normalized_training_test_set(
            close_, rnn.past_n_, test_size)
        """ Train """
        rnn.__train__(open_train_X, open_train_y)
        rnn.__train__(high_train_X, high_train_y)
        rnn.__train__(low_train_X, low_train_y)
        rnn.__train__(close_train_X, close_train_y)
        """ Plot The total Loss """
        rnn.__plot_total_loss__()
        """ Plot Predicted & Actual Data """
        rnn.__test__(open_test_X)
        rnn.__plot_prediction__(open_test_X, open_test_y, open_, "OPEN")

        rnn.__test__(high_test_X)
        rnn.__plot_prediction__(high_test_X, high_test_y, high_, "HIGH")

        rnn.__test__(low_test_X)
        rnn.__plot_prediction__(low_test_X, low_test_y, low_, "LOW")

        rnn.__test__(close_test_X)
        rnn.__plot_prediction__(close_test_X, close_test_y, close_, "CLOSE")