Skip to content

Commit

Permalink
remove conditional division
Browse files Browse the repository at this point in the history
  • Loading branch information
vzhomeexperiments committed Dec 6, 2020
1 parent 74a60b8 commit c695352
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
## Changes

* solving warnings by changing example in *mt_make_model* function
* conditional division of data by 100 in *mt_evaluate* function
* change function *mt_make_model* to read manually checked dataset

# lazytrade 0.4.2
Expand Down
4 changes: 2 additions & 2 deletions R/aml_make_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ aml_make_model <- function(symbol, timeframe, path_model, path_data,
model_status <- readr::read_csv(dec_file_path) %>% select(MaxPerf) %$% MaxPerf
} else if(force_update == TRUE) {
# delete the model and previous test results
remove(dec_file_path)
remove(m_path)
#try(remove(dec_file_path), silent = TRUE)
#try(remove(m_path),silent = TRUE)
model_status <- -1
} else { model_status <- 0 }

Expand Down
5 changes: 0 additions & 5 deletions R/mt_evaluate.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ mt_evaluate <- function(x, path_model, num_cols, timeframe){
# load models
m1 <- h2o::h2o.loadModel(m_path)

#normalize macd value if we are dealing with JPY pairs
if(stringr::str_detect(names(x), 'JPY')){
x <- x/100
}

# Convert to matrix
X_m <- lazytrade::to_m(x, num_cols) %>% as.data.frame()
colnames(X_m) <- c(paste("X",1:num_cols,sep=""))
Expand Down

0 comments on commit c695352

Please sign in to comment.