Early Stopping plot

Author

Blessing

Published

August 1, 2023

Early Stopping

This document is a reference to the Early stopping RMarkdown file. Here, we present the results of conducting the combined 10 replicates of correlation for within-group 2 prediction (Within), cross-group prediction (Cross), and Early stopping (Early). The purpose was to validate the approach. Subsequently, a plot was generated, with each color representing a different replicate.

Load the data

  • All_COR.RData is a data file that contains rows representing Within, Cross, and Early-stopping (with 100 stops- Early_1:100) correlation as well as columns representing different replicates.
Code
load("C:/Users/blezn/Downloads/All_COR.RData")
head(All_COR)
            COR.1     COR.2     COR.3     COR.4     COR.5     COR.6     COR.7
Within  0.4217743 0.3281172 0.3120639 0.4015264 0.4202702 0.5074515 0.4765901
Cross   0.2694750 0.2986771 0.3099988 0.2702436 0.1896547 0.3437431 0.3987460
Early_1 0.3751693 0.2292543 0.2711661 0.3644408 0.3956357 0.5248104 0.4742403
Early_2 0.3843944 0.2743040 0.2852621 0.3512140 0.3966033 0.5012592 0.4573825
Early_3 0.3960592 0.3069372 0.2939665 0.3548363 0.4005025 0.4869267 0.4562865
Early_4 0.4085050 0.3251665 0.2987504 0.3680593 0.4086223 0.4865949 0.4595077
            COR.8     COR.9    COR.10
Within  0.3777918 0.3354736 0.4226710
Cross   0.2256613 0.2561965 0.1866163
Early_1 0.3631880 0.3181720 0.3915712
Early_2 0.3639801 0.3053163 0.4037270
Early_3 0.3641574 0.3065492 0.4164231
Early_4 0.3661388 0.3115860 0.4252158

Plotting result

Figure 1 Relationship between each parameter (* legend only shows the plot character since each color represents different replicate)

Code
plot(1:100, type = "n", xlim = c(1, 100), ylim = c(0.17, 0.58), xlab = "Index", ylab = "COR") %>%
  {invisible(lapply(seq_len(ncol(All_COR)), function(i) points(1:100, All_COR[, i][-c(1, 2)], col = i)))}
      
abline(h=All_COR[1,], col=1:10, lty= 2, lwd=1.5)
abline(h=All_COR[2,], col=1:10, lty="solid", lwd=1.5)

legend("topright", legend = c("Within","Cross", "Early"), pch= c("¦","|", "o"))

Figure 1: Correlation plot