koplsPlotModelDiagnostics {kopls} | R Documentation |
Produces overview plots of model training results returned from the koplsModel
function.
koplsPlotModelDiagnostics(model, plot.values = FALSE)
model |
The model training result (see koplsModel ). |
plot.values |
If TRUE, the exact values will be displayed on the bars as text labels. |
Produces 2x2 panels of bar plots, containing the total explained variation (R2X), the Y-orthogonal explained variation (R2XO), the Y-correlated explained variation (R2XC) and (if available) the predicted variation from cross-validation (Q2Y).
Max Bylesjo and Mattias Rantalainen
Rantalainen M, Bylesjo M, Cloarec O, Nicholson JK, Holmes E and Trygg J. Kernel-based orthogonal projections to latent structures (K-OPLS), J Chemometrics 2007; 21:376-385. doi:10.1002/cem.1071.
## Load data set data(koplsExample) ## Define kernel function parameter sigma<-25 ## Define number of Y-orthogonal components nox<-3 ## Construct kernel Ktr<-koplsKernel(Xtr,NULL,'g',sigma) ## Model model<-koplsModel(Ktr,Ytr,1,nox,'mc','mc'); ## Visualize results koplsPlotModelDiagnostics(model) title("Model diagnostics without cross-validation")