SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Metabolomics: an interpreting tool to
    understand kidney graft recipients
  grouping and their recovery trajectory



                           Marco Calderisi, PhD
                        m.calderisi@kode-solutions.net

                                 Italian BioR Day
                              Lodi 30 Novembre 2012
Italian BioR Day
Lodi 30 Novembre 2012
Kidney

Kidney removes wastes and
fluid from the body




Italian BioR Day
Lodi 30 Novembre 2012   1/36
Aim
Kidney graft recipients
monitoring



                           immunological rejection
                        ischemia/reperfusion injury
                 immunosuppressant nephrotoxicity
Italian BioR Day
Lodi 30 Novembre 2012        2/36
How

      Urine samples +
      1H-NMR            +
      Chemometrics =
      Metabolomics


Italian BioR Day
Lodi 30 Novembre 2012       3/36
Metabolomics

Determination of multiple metabolites in biofluids

and tissues and their changes over time



Instrumentation: NMR, MS, GC/MS, HPLC/MS



Italian BioR Day
Lodi 30 Novembre 2012    4/36
Chemometrics
Chemometrics: chemistry + statistic + informatic




Italian BioR Day
Lodi 30 Novembre 2012   5/36
Exploration + Modelling
                        PCA




                                PLS

Italian BioR Day
Lodi 30 Novembre 2012         6/36
Exploration + Modelling




Italian BioR Day
Lodi 30 Novembre 2012   6/36
Data Import
Matlab

                    save datiperR.mat data asseX '-v6'



                              require(R.matlab)
                        aa <- readMat('datiperR.mat')
                               dati <- aa$data
                               dati <- t(dati)
                              asseX <- aa$asseX




Italian BioR Day
Lodi 30 Novembre 2012                7/36
Data Analysis

       Preprocessing
       and
       pretreatment




                               Exploration


                                Modelling




Italian BioR Day
Lodi 30 Novembre 2012   8/36
Preprocessing + Pretreatment



                        baseline and phase correction,
                        referencing to internal standard,
                        signals alignment

                                                 normalization
                                                    centering
                                                      scaling
                                        other transformations


Italian BioR Day
Lodi 30 Novembre 2012                      9/36
Preprocessing + Pretreatment

ptw, dtw, xcms -> MS or LC spectra
PROcess -> protein mass spectrometry

peak peaking

binning, TMS alignment



Italian BioR Day
Lodi 30 Novembre 2012   10/36
Preprocessing + Pretreatment

TMS peaks before and after alignment
                                ...with icoshift...




Italian BioR Day
Lodi 30 Novembre 2012   11/36
Preprocessing + Pretreatment
binning
# 10 points binnings
ynew <- colMeans(matrix(dati[1,1:32760], nrow = 10))
xnew <- colMeans(matrix(asseX[1:32760], nrow = 10))

# plot
plot(asseX[1:32760], dati[1, 1:32760], type = "l", xlab
  = "asseX ", ylab = "response", main = "binning", col
  = "red", ylim=c(0,10^8))
lines(xnew, ynew)




Italian BioR Day
Lodi 30 Novembre 2012     12/36
Preprocessing + Pretreatment
binning




Italian BioR Day
Lodi 30 Novembre 2012   13/36
Preprocessing + Pretreatment
Baseline correction
require(ptw)
# baseline drift
ybase <- 45600*asseX + 20000*asseX^2 - 2000*asseX^3
plot(asseX, ybase[1,], type='l', col='blue')
y1mod <- dati[1,]+ybase[1,]
# plot
plot(asseX, y1mod, type='l', ylim=c(-3000000, 10000000), col='blue')
lines(asseX, dati[1,], col='red')
# correction
lines(asseX, baseline.corr(y1mod), col='grey')
abline(h=0, col='green', lty=2)
legend('topright', legend=c('modified', 'original', 'baseline
corrected'), lty=1, bty='n', col=c('blue', 'red', 'grey'), cex=0.7)




Italian BioR Day
Lodi 30 Novembre 2012           14/36
Preprocessing + Pretreatment
Baseline correction




Italian BioR Day
Lodi 30 Novembre 2012   15/36
Preprocessing + Pretreatment
Data reduction




                        p1
                                               p3



                                 p2                 p4


                                      δ ppm!

xnew <- c(x[p1:p2,], x[p3:p4,])
Italian BioR Day
Lodi 30 Novembre 2012    16/36
Preprocessing + Pretreatment
Data reduction

     plot(dati[1,], type='l')
     require (TeachingDemos)
     plot(dati[1,], type='l')
     # zooming the plot
     zoomplot(locator(2))
     # find the points
     p1 <- locator(1)
     p2 <- locator(1)
     plot(dati[1,], type='l')
     # zooming the plot
     zoomplot(locator(2))
     p3 <- locator(1)
     p4 <- locator(1)
     # new reduced dataset
     dati.r <- dati[,c(p1$x:p2$x, p3$x:p4$x)]


Italian BioR Day
Lodi 30 Novembre 2012             17/36
Preprocessing + Pretreatment
Unit area normalization
 dati.un <- sweep(dati.r, MARGIN = 1, apply(dati, 1,function(x)
 sqrt(sum(x^2))), FUN = '/')

 par(mfrow=c(2,1))
 asseX <- t(asseX.r)
 matplot(asseX.r, t(dati.r), type='l', lwd=1, col=setcol, lty=1)
 matplot(asseX.r, t(dati.un), type='l', lwd=1, col=setcol, lty=1)




Italian BioR Day
Lodi 30 Novembre 2012           18/36
Preprocessing + Pretreatment
Unit area normalization




Italian BioR Day
Lodi 30 Novembre 2012   19/36
Preprocessing + Pretreatment
Scaling
                              CENTERING

                             AUTOSCALING

                            PARETO SCALING



                        (X-Xmedio)/radq(sd)

Italian BioR Day
Lodi 30 Novembre 2012             20/36
Preprocessing + Pretreatment
Scaling
 require(pls)

 dati.c <- scale(dati.r, center = T, scale =F)
 dati.sc <- scale(dati.r, center = T, scale =T)

 dati.p <- sweep(dati.r, MARGIN = 2, sqrt(apply(dati.r, MARGIN = 2,
 sd)), FUN = "/")




Italian BioR Day
Lodi 30 Novembre 2012           21/36
Preprocessing + Pretreatment
Scaling




Italian BioR Day
Lodi 30 Novembre 2012   22/36
Exploration + Modelling



    15 patients were sampled all along the
     hospital recovery period (from 5 to 40
     days) and during the first follow up


    systematic sampling (one sample a day)



Italian BioR Day
Lodi 30 Novembre 2012         23/36
Exploration + Modelling




Italian BioR Day
Lodi 30 Novembre 2012   24/36
Exploration + Modelling
PCA
Pareto scaling
3 patients
                        Follow-up

                                         Post-operation




                              Pre-discharge




Italian BioR Day
Lodi 30 Novembre 2012          25/36
Exploration + Modelling
PCA
Pareto scaling
15 patients
                              Follow-up


                                          Post-operation




                        Pre-discharge




Italian BioR Day
Lodi 30 Novembre 2012          26/36
Exploration + Modelling
 require(ChemometricsWithR)

 mod <- PCA(dati.p)

 figura1a <- scores(mod)

 plot(figura1a[,2], figura1a[,3], xlab ='PC 1 (exp. var. 13.96%)',
 ylab = 'PC 2 (exp. var. 9.88%)', xaxt="n", yaxt="n", mgp=c(2.5, 1,
 0), cex.lab = 1, type = 'n')

 axis(1, at=seq(-1,1,0.25), lwd = 0, lwd.ticks = 1, tcl = 0.2,
 cex.axis=1, mgp=c(1.5, 0.5, 0))
 axis(2, at=seq(-1,1,0.25), lwd = 0, lwd.ticks = 1, tcl = 0.2,
 cex.axis=1, las = 2, mgp=c(1.5, 0.5, 0))

 points(figura1a[,2], figura1a[,3], pch=as.numeric(figura1a[,1]),
 cex=0.8)

 abline(v=0, h=0, col='grey', lty = 2)
Italian BioR Day
Lodi 30 Novembre 2012            27/36
Exploration + Modelling
PLS-DA analysis
one class vs one class

                        Modelled class:           1    2      3

Calibration             Sensitivity           0.96    0.88   0.91

                        Specificity                1   0.9    0.96

                        Class. Err            0.02    0.11   0.07

Cross Validation        Sensitivity           0.94    0.86   0.91

                        Specificity                1   0.83   0.92

                        Class. Err            0.03    0.15   0.08




Italian BioR Day
Lodi 30 Novembre 2012                     28/36
Exploration + Modelling
Post operation stage.
The creatinine and creatine signals are
rather low and there is a lipoprotein signal




Italian BioR Day
Lodi 30 Novembre 2012                          29/36
Exploration + Modelling
Pre discharge stage.
Creatinine and creatine signals pretty high
and lipoprotein signal almost disappeared




Italian BioR Day
Lodi 30 Novembre 2012                         30/36
Exploration + Modelling
Follow up stage.
The creatinine and creatine signals are very
intense




Italian BioR Day
Lodi 30 Novembre 2012                          31/36
Exploration + Modelling
 mod <- do.pls(dati.p, class.p, 2, scale="mean")

 VIP.scores.Y1 <- mod$VIP[,2]

 plot(-axis.scale,VIP.scores.Y1, type='l', xaxt='n', yaxt='n',
      xlab='[ppm]', ylab='VIP scores', ylim=c(0,350), lwd = 0.5,
 cex.lab=0.8, main = 'VIP scores class 1', cex.main=0.9,
 col='black', mgp=c(2.5, 1, 0))

 axis(1, at=seq(0,-10,-1), labels = seq(0,10,1), lwd = 0, lwd.ticks
 = 1, tcl = 0.2, cex.axis=0.8)

 axis(2, at=seq(0, 320, 50), lwd = 0, lwd.ticks = 1, tcl = 0.2,
 cex.axis=0.8, las= 1)

 grid(col = "lightgray", lty = "dotted", lwd =1)




Italian BioR Day
Lodi 30 Novembre 2012            32/36
Exploration + Modelling
 require(pls) // do.pls

 short command: mod <- do.pls(x,y)
 extensive command: mod <- do.pls(x,y, ncomp, scale=c("mean",
 "autoscaling"), graph=c("line", "points"))

 aim: to do a pls regression analysis with just one “click”




 http://cran.r-project.org/web/packages/pls/
 http://mevik.net/work/software/pls.html




Italian BioR Day
Lodi 30 Novembre 2012            33/36
Exploration + Modelling
 Input:
 • x is the predictor matrix
 • y is the response variable
 • ncomp it is the requested number of latent variables (optional).
   The default is the LV’s number corresponding to the lowest
   RMSECV(*)
 • scale: choose between mean centering (default) and autoscaling
 • graph it is the plot layout: choose between points or line for
   predictors plot (optional).


 (*) only Leave-One-Out CV procedure it is implemented




Italian BioR Day
Lodi 30 Novembre 2012            34/36
Exploration + Modelling
 Output:
 it is a list.
 • modello, it is the usual mvr output
 • performance, explained variance for predictors and response
   variable, RMSE, RMSECV, number of latent variables selected)
 • VIP
 • coefficients




Italian BioR Day
Lodi 30 Novembre 2012            35/36
Exploration + Modelling




Italian BioR Day
Lodi 30 Novembre 2012   36/36
grazie per
   l’attenzione
    Marco Calderisi, PhD
    m.calderisi@kode-solutions.net
    kode-solutions.net




Italian BioR Day
Lodi 30 Novembre 2012

Contenu connexe

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Metabolomics: an interpreting tool to understand kidney graft recipients grouping and their recovery trajectory

  • 1. Metabolomics: an interpreting tool to understand kidney graft recipients grouping and their recovery trajectory Marco Calderisi, PhD m.calderisi@kode-solutions.net Italian BioR Day Lodi 30 Novembre 2012 Italian BioR Day Lodi 30 Novembre 2012
  • 2. Kidney Kidney removes wastes and fluid from the body Italian BioR Day Lodi 30 Novembre 2012 1/36
  • 3. Aim Kidney graft recipients monitoring immunological rejection ischemia/reperfusion injury immunosuppressant nephrotoxicity Italian BioR Day Lodi 30 Novembre 2012 2/36
  • 4. How Urine samples + 1H-NMR + Chemometrics = Metabolomics Italian BioR Day Lodi 30 Novembre 2012 3/36
  • 5. Metabolomics Determination of multiple metabolites in biofluids and tissues and their changes over time Instrumentation: NMR, MS, GC/MS, HPLC/MS Italian BioR Day Lodi 30 Novembre 2012 4/36
  • 6. Chemometrics Chemometrics: chemistry + statistic + informatic Italian BioR Day Lodi 30 Novembre 2012 5/36
  • 7. Exploration + Modelling PCA PLS Italian BioR Day Lodi 30 Novembre 2012 6/36
  • 8. Exploration + Modelling Italian BioR Day Lodi 30 Novembre 2012 6/36
  • 9. Data Import Matlab save datiperR.mat data asseX '-v6' require(R.matlab) aa <- readMat('datiperR.mat') dati <- aa$data dati <- t(dati) asseX <- aa$asseX Italian BioR Day Lodi 30 Novembre 2012 7/36
  • 10. Data Analysis Preprocessing and pretreatment Exploration Modelling Italian BioR Day Lodi 30 Novembre 2012 8/36
  • 11. Preprocessing + Pretreatment baseline and phase correction, referencing to internal standard, signals alignment normalization centering scaling other transformations Italian BioR Day Lodi 30 Novembre 2012 9/36
  • 12. Preprocessing + Pretreatment ptw, dtw, xcms -> MS or LC spectra PROcess -> protein mass spectrometry peak peaking binning, TMS alignment Italian BioR Day Lodi 30 Novembre 2012 10/36
  • 13. Preprocessing + Pretreatment TMS peaks before and after alignment ...with icoshift... Italian BioR Day Lodi 30 Novembre 2012 11/36
  • 14. Preprocessing + Pretreatment binning # 10 points binnings ynew <- colMeans(matrix(dati[1,1:32760], nrow = 10)) xnew <- colMeans(matrix(asseX[1:32760], nrow = 10)) # plot plot(asseX[1:32760], dati[1, 1:32760], type = "l", xlab = "asseX ", ylab = "response", main = "binning", col = "red", ylim=c(0,10^8)) lines(xnew, ynew) Italian BioR Day Lodi 30 Novembre 2012 12/36
  • 15. Preprocessing + Pretreatment binning Italian BioR Day Lodi 30 Novembre 2012 13/36
  • 16. Preprocessing + Pretreatment Baseline correction require(ptw) # baseline drift ybase <- 45600*asseX + 20000*asseX^2 - 2000*asseX^3 plot(asseX, ybase[1,], type='l', col='blue') y1mod <- dati[1,]+ybase[1,] # plot plot(asseX, y1mod, type='l', ylim=c(-3000000, 10000000), col='blue') lines(asseX, dati[1,], col='red') # correction lines(asseX, baseline.corr(y1mod), col='grey') abline(h=0, col='green', lty=2) legend('topright', legend=c('modified', 'original', 'baseline corrected'), lty=1, bty='n', col=c('blue', 'red', 'grey'), cex=0.7) Italian BioR Day Lodi 30 Novembre 2012 14/36
  • 17. Preprocessing + Pretreatment Baseline correction Italian BioR Day Lodi 30 Novembre 2012 15/36
  • 18. Preprocessing + Pretreatment Data reduction p1 p3 p2 p4 δ ppm! xnew <- c(x[p1:p2,], x[p3:p4,]) Italian BioR Day Lodi 30 Novembre 2012 16/36
  • 19. Preprocessing + Pretreatment Data reduction plot(dati[1,], type='l') require (TeachingDemos) plot(dati[1,], type='l') # zooming the plot zoomplot(locator(2)) # find the points p1 <- locator(1) p2 <- locator(1) plot(dati[1,], type='l') # zooming the plot zoomplot(locator(2)) p3 <- locator(1) p4 <- locator(1) # new reduced dataset dati.r <- dati[,c(p1$x:p2$x, p3$x:p4$x)] Italian BioR Day Lodi 30 Novembre 2012 17/36
  • 20. Preprocessing + Pretreatment Unit area normalization dati.un <- sweep(dati.r, MARGIN = 1, apply(dati, 1,function(x) sqrt(sum(x^2))), FUN = '/') par(mfrow=c(2,1)) asseX <- t(asseX.r) matplot(asseX.r, t(dati.r), type='l', lwd=1, col=setcol, lty=1) matplot(asseX.r, t(dati.un), type='l', lwd=1, col=setcol, lty=1) Italian BioR Day Lodi 30 Novembre 2012 18/36
  • 21. Preprocessing + Pretreatment Unit area normalization Italian BioR Day Lodi 30 Novembre 2012 19/36
  • 22. Preprocessing + Pretreatment Scaling CENTERING AUTOSCALING PARETO SCALING (X-Xmedio)/radq(sd) Italian BioR Day Lodi 30 Novembre 2012 20/36
  • 23. Preprocessing + Pretreatment Scaling require(pls) dati.c <- scale(dati.r, center = T, scale =F) dati.sc <- scale(dati.r, center = T, scale =T) dati.p <- sweep(dati.r, MARGIN = 2, sqrt(apply(dati.r, MARGIN = 2, sd)), FUN = "/") Italian BioR Day Lodi 30 Novembre 2012 21/36
  • 24. Preprocessing + Pretreatment Scaling Italian BioR Day Lodi 30 Novembre 2012 22/36
  • 25. Exploration + Modelling 15 patients were sampled all along the hospital recovery period (from 5 to 40 days) and during the first follow up systematic sampling (one sample a day) Italian BioR Day Lodi 30 Novembre 2012 23/36
  • 26. Exploration + Modelling Italian BioR Day Lodi 30 Novembre 2012 24/36
  • 27. Exploration + Modelling PCA Pareto scaling 3 patients Follow-up Post-operation Pre-discharge Italian BioR Day Lodi 30 Novembre 2012 25/36
  • 28. Exploration + Modelling PCA Pareto scaling 15 patients Follow-up Post-operation Pre-discharge Italian BioR Day Lodi 30 Novembre 2012 26/36
  • 29. Exploration + Modelling require(ChemometricsWithR) mod <- PCA(dati.p) figura1a <- scores(mod) plot(figura1a[,2], figura1a[,3], xlab ='PC 1 (exp. var. 13.96%)', ylab = 'PC 2 (exp. var. 9.88%)', xaxt="n", yaxt="n", mgp=c(2.5, 1, 0), cex.lab = 1, type = 'n') axis(1, at=seq(-1,1,0.25), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=1, mgp=c(1.5, 0.5, 0)) axis(2, at=seq(-1,1,0.25), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=1, las = 2, mgp=c(1.5, 0.5, 0)) points(figura1a[,2], figura1a[,3], pch=as.numeric(figura1a[,1]), cex=0.8) abline(v=0, h=0, col='grey', lty = 2) Italian BioR Day Lodi 30 Novembre 2012 27/36
  • 30. Exploration + Modelling PLS-DA analysis one class vs one class Modelled class: 1 2 3 Calibration Sensitivity 0.96 0.88 0.91 Specificity 1 0.9 0.96 Class. Err 0.02 0.11 0.07 Cross Validation Sensitivity 0.94 0.86 0.91 Specificity 1 0.83 0.92 Class. Err 0.03 0.15 0.08 Italian BioR Day Lodi 30 Novembre 2012 28/36
  • 31. Exploration + Modelling Post operation stage. The creatinine and creatine signals are rather low and there is a lipoprotein signal Italian BioR Day Lodi 30 Novembre 2012 29/36
  • 32. Exploration + Modelling Pre discharge stage. Creatinine and creatine signals pretty high and lipoprotein signal almost disappeared Italian BioR Day Lodi 30 Novembre 2012 30/36
  • 33. Exploration + Modelling Follow up stage. The creatinine and creatine signals are very intense Italian BioR Day Lodi 30 Novembre 2012 31/36
  • 34. Exploration + Modelling mod <- do.pls(dati.p, class.p, 2, scale="mean") VIP.scores.Y1 <- mod$VIP[,2] plot(-axis.scale,VIP.scores.Y1, type='l', xaxt='n', yaxt='n', xlab='[ppm]', ylab='VIP scores', ylim=c(0,350), lwd = 0.5, cex.lab=0.8, main = 'VIP scores class 1', cex.main=0.9, col='black', mgp=c(2.5, 1, 0)) axis(1, at=seq(0,-10,-1), labels = seq(0,10,1), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=0.8) axis(2, at=seq(0, 320, 50), lwd = 0, lwd.ticks = 1, tcl = 0.2, cex.axis=0.8, las= 1) grid(col = "lightgray", lty = "dotted", lwd =1) Italian BioR Day Lodi 30 Novembre 2012 32/36
  • 35. Exploration + Modelling require(pls) // do.pls short command: mod <- do.pls(x,y) extensive command: mod <- do.pls(x,y, ncomp, scale=c("mean", "autoscaling"), graph=c("line", "points")) aim: to do a pls regression analysis with just one “click” http://cran.r-project.org/web/packages/pls/ http://mevik.net/work/software/pls.html Italian BioR Day Lodi 30 Novembre 2012 33/36
  • 36. Exploration + Modelling Input: • x is the predictor matrix • y is the response variable • ncomp it is the requested number of latent variables (optional). The default is the LV’s number corresponding to the lowest RMSECV(*) • scale: choose between mean centering (default) and autoscaling • graph it is the plot layout: choose between points or line for predictors plot (optional). (*) only Leave-One-Out CV procedure it is implemented Italian BioR Day Lodi 30 Novembre 2012 34/36
  • 37. Exploration + Modelling Output: it is a list. • modello, it is the usual mvr output • performance, explained variance for predictors and response variable, RMSE, RMSECV, number of latent variables selected) • VIP • coefficients Italian BioR Day Lodi 30 Novembre 2012 35/36
  • 38. Exploration + Modelling Italian BioR Day Lodi 30 Novembre 2012 36/36
  • 39. grazie per l’attenzione Marco Calderisi, PhD m.calderisi@kode-solutions.net kode-solutions.net Italian BioR Day Lodi 30 Novembre 2012