# \donttest{
library(dplyr)
library(magrittr)
library(readr)
library(h2o)
library(lazytrade)
library(stats)
path_model <- normalizePath(tempdir(),winslash = "/")
path_data <- normalizePath(tempdir(),winslash = "/")
data(macd_ML60M)
Sys.sleep(5)
# start h2o engine
h2o.init(nthreads = 2)
# performing Deep Learning Classification using manually labelled data
mt_make_model(indicator_dataset = macd_ML60M,
num_bars = 64,
timeframe = 60,
path_model = path_model,
path_data = path_data,
activate_balance = TRUE,
num_nn_options = 3,
num_epoch = 10)
data(price_dataset_big)
data <- head(price_dataset_big, 5000) #reduce computational time
ai_class <- mt_stat_transf(indicator_dataset = data,
num_bars = 64,
timeframe = 60,
path_data = path_data,
mt_classes = c('BUN', 'BEN', 'RAN'))
# performing Deep Learning Classification using the custom function auto clustered data
mt_make_model(indicator_dataset = ai_class,
num_bars = 64,
timeframe = 60,
path_model = path_model,
path_data = path_data,
activate_balance = TRUE,
num_nn_options = 6,
num_epoch = 10,
is_cluster = TRUE)
# performing Deep Learning Classification using the custom function auto clustered data
# and fixed nn structure
mt_make_model(indicator_dataset = ai_class,
num_bars = 64,
timeframe = 60,
path_model = path_model,
path_data = path_data,
activate_balance = TRUE,
num_nn_options = 0,
fixed_nn_struct = c(10, 10),
num_epoch = 10,
is_cluster = TRUE)
# stop h2o engine
h2o.shutdown(prompt = FALSE)
#set delay to insure h2o unit closes properly before the next test
Sys.sleep(5)
# }
Run the code above in your browser using DataLab