SCM

SCM Repository

[chemosensors] View of /pkg/man/demo-SensorArrayNoise.Rd
ViewVC logotype

View of /pkg/man/demo-SensorArrayNoise.Rd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (download) (as text) (annotate)
Wed Mar 2 14:48:07 2016 UTC (2 years, 11 months ago) by variani
File size: 1113 byte(s)
new Rd produced by roxygen2
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/demos.R
\docType{data}
\name{demo-SensorArrayNoise}
\alias{demo-SensorArrayNoise}
\title{Demo SensorArrayNoise.}
\description{
Demo SensorArrayNoise.
}
\examples{
set.seed(1)

data(UNIMANshort)
conc <- UNIMANshort$C
sdata.uniman <- UNIMANshort$dat

mod.uniman <- prcomp(sdata.uniman, center = TRUE, scale = FALSE)

# 1) a virtual array with default noise parameters
# - csd (0.1), ssd (0.1), dsd (0.1)
# - data model 'mvr' reproduces the structure of UNIMAN data better
sa <- SensorArray(model = "plsr", num = 1:17, enableSorption = FALSE)

# plot short-term UNIMAN dataset (200 samples)
p0 <- plotPCA(sa, conc = conc, sdata = sdata.uniman, mod = mod.uniman, main = "UNIMAN PCA")
p0

p1 <- plotPCA(sa, conc = conc, mod = mod.uniman, 
  main = "Synthetic data #1 \\n projected on UNIMAN PCA")
p1

# 2) add more noise to 'sa'
# - csd = 0.5, ssd =0.5, dsd = 0.5
csd(sa) <- 0.5
ssd(sa) <- 0.5
dsd(sa) <- 0.5

p2 <- plotPCA(sa, conc = conc, mod = mod.uniman, 
  main = "Synthetic data #2 \\n projected on UNIMAN PCA")
p2

}
\keyword{demo}


R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge