plot.glmtrans {glmtrans} | R Documentation |
Plot the losses of different sources and the threshold to determine transferability for object with class "glmtrans" or "glmtrans_source_detection".
## S3 method for class 'glmtrans'
plot(x, ...)
x |
an object from class "glmtrans" or "glmtrans_source_detection", which are the output of functions |
... |
additional arguments that can be passed to |
a "ggplot" visualization with the transferable threshold and losses of different sources.
Tian, Y. and Feng, Y., 2021. Transfer learning with high-dimensional generalized linear models. Submitted.
glmtrans
, source_detection
, ggplot
.
set.seed(1, kind = "L'Ecuyer-CMRG")
D.training <- models("gaussian", K = 2, p = 500, Ka = 1)
# plot for class "glmtrans"
fit.gaussian <- glmtrans(D.training$target, D.training$source)
plot(fit.gaussian)
# plot for class "glmtrans_source_detection"
detection.gaussian <- source_detection(D.training$target, D.training$source)
plot(detection.gaussian)