Skip to content

Commit

Permalink
Update plotting functions
Browse files Browse the repository at this point in the history
  • Loading branch information
KauriGiant committed Feb 24, 2025
1 parent 5400214 commit 0366470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xgb.cv.fit.scatterplot.r
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ xgbm.cv.fit.scatterplot = function(pred,CVtrain_y,path)
Title = paste0("Cor = ",Cor)
Filename = paste0(path,"FitScatterplot.png")
png(Filename, height = 1600,width = 1600)
par(mar = c(10,12,12,2), cex.main = 5,cex.lab = 4.8,cex.axis = 4.6,mgp = c(7,2,0))
par(mar = c(10,12,12,8), cex.main = 5,cex.lab = 4.8,cex.axis = 4.6,mgp = c(7,2,0))
plot(pred~CVtrain_y, main = Title,
xlab = paste0("Observed response"),ylab = paste0("Fitted response"), pch = NA)
points(CVtrain_y,pred, cex = 2, col = 1)
Expand Down
2 changes: 1 addition & 1 deletion xgb.cv.partial.r
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ xgbm.cv.partial = function(cv,Nfolds,CVtrain_x,var,path,CVtrain_y,ResponseName =
Title = Predictors[var]
Filename = paste0(path,ResponseName,".",Predictors[var],".partial.png")
png(Filename,width = 1800, height = 1600)
par(mfcol = c(1,1), cex.main = 5, cex.lab = 4.8, cex.axis = 4.6, mar = c(10,12,8,2),
par(mfcol = c(1,1), cex.main = 5, cex.lab = 4.8, cex.axis = 4.6, mar = c(10,12,8,8),
mgp = c(7,2,0),font.lab = 2,oma = c(0, 0, 9, 0))
plot(PartialPreds[,1],PartialPreds[,2], ylim = c(min(PartialPreds[,2]),max(PartialPreds[,2])),pch = NA,
xlab = Predictors[var], ylab = ResponseName,main = Title)
Expand Down

0 comments on commit 0366470

Please sign in to comment.