From f7f46f0c5947ff3f11ba0c74c1e3814448f1a9cb Mon Sep 17 00:00:00 2001 From: Carl Corder <carl.corder@huskers.unl.edu> Date: Tue, 1 Oct 2019 19:22:55 +0000 Subject: [PATCH] Update run_models.r --- scripts/run_models.r | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/run_models.r b/scripts/run_models.r index e2709ac..1a88737 100644 --- a/scripts/run_models.r +++ b/scripts/run_models.r @@ -9,10 +9,10 @@ library("ggplot2") # ======================================== E V A L U A T I N G ======================================== # load data sent to hcc -load(file = "~/Desktop/data.RData") +load(file = "~/data.RData") # load models and training index created on hcc -load(file = "~/Desktop/model-rf.RData") +load(file = "~/model-rf.RData") # fetch the data that was used to train by passing in the training index training.data <- data[training.index, ] @@ -139,11 +139,6 @@ rtn_interpolate <- function(base, t) { y <- predict(fit.rf, rtn_interpolate(x, t)) # plot only the predicted points vs renewal -plot(t, y) +plot(t, y, main = "STD Service East", xlab = "Renewal", ylab = "RTN") +grid(NA, 10, lwd = 2) # grid only in y-direction lines(t, y) - -# create smooth plot over data -df <- data.frame(t, y) -ggplot(df, aes(x = t, y = y)) + - geom_smooth(method = "auto") + - geom_point() -- GitLab