SCM Repository

[chemosensors] View of /pkg/man/SensorModel-class.Rd
ViewVC logotype

View of /pkg/man/SensorModel-class.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: 4178 byte(s)
new Rd produced by roxygen2
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ChemosensorsClass.R, R/SensorModelClass.R, R/SensorModelClassMethods.R
\title{Method coeffNonneg.}




\S4method{initialize}{SensorModel}(.Object, nsensors = "numeric",
  num = "numeric", gases = "numeric", gnames = "character",
  concUnits = "character", concUnitsInt = "character",
  datasetSensorModel = "character", datasetDistr = "character",
  pck = "character", coefsd, model = "character", coeffNonneg = "logical",
  coeffNonnegTransform = "character", Conc0, Conc, dat, tunit = "numeric",
  beta = "numeric", ...)

\item{...}{parameters of constructor.}
Character vector of model names.

List of the default parameters.
Method coeffNonneg.

Class \code{\link{SensorModel}} predicts a sensor signal in response to an input concentration matrix
by means of a regression model stored in slot \code{dataModel}.

Function to get model names of class \code{\link{SensorModel}}.

Function to get default constructor parameters of class \code{\link{SensorModel}}.

Constructor method of SensorModel Class.

Wrapper function SensorModel.
The model explicitely assumes that the sensor response to a mixture of 
analytes is a sum of responses to the individual analyte components.
Linear models \code{mvr} and \code{plsr} follow this assumtion in their nature.

Slots of the class:
  \code{num} \tab Sensor number (\code{1:17}). The default value is \code{1}. \cr
  \code{gases} \tab Gas indices. \cr
  \code{ngases} \tab The number of gases. \cr
  \code{gnames} \tab Names of gases. \cr
  \code{concUnits} \tab Concentration units external to the model, values given in an input concentration matrix. \cr
  \code{concUnitsInt} \tab Concentration units internal for the model, values used numerically to build regression models. \cr
  \code{dataModel} \tab Data model of class \code{SensorDataModel} performs a regression (free of the routine on units convertion, etc). \cr
  \code{coeffNonneg} \tab Logical whether model coefficients must be non-negative. By default, \code{FALSE}. \cr
  \code{coeffNonnegTransform} \tab Name of transformation to convert negative model coefficients to non-negative values. \cr
  \code{beta} \tab (parameter of sensor diversity) A scaling coefficient of how different coefficients 
    of \code{SensorDataModel} will be in comparision with those coefficients of the UNIMAN sensors. 
    The default value is \code{2}. \cr

Methods of the class:
  \code{predict} \tab Predicts a sensor model response to an input concentration matrix. \cr
  \code{coef} \tab Extracts the coefficients of a regression model stored in slot \code{dataModel}. \cr

The \code{plot} method has two types (parameter \code{y}):
  \code{response} \tab (default) Shows the sensitivity curves per gas in normalized concentration units. \cr
  \code{predict} \tab  Depicts input (parameter \code{conc}) and ouput of the model for a specified gas (parameter \code{gases}). \cr

# sensor model: default initialization
sm <- SensorModel()

# get information about the model

print(coef(sm)) # sensitivity coefficients


# get available model names
model.names <- SensorModelNames()

# sensor model: custom parameters
sm <- SensorModel(num=7, model="plsr", gases=c(1, 3))


#plot(sm, uniman=TRUE) # add UNIMAN reference data (the model was build from)

# method plot
#  - plot types 'y': response, predict
sm <- SensorModel() # default sensor model

plot(sm, "response", main="plot(sm, 'response')") 
# default plot type, i.e. 'plot(sm)' does the same plotting

conc <- concSample(sm, "range", gases=1, n=10)
plot(sm, "predict", conc, gases=1, main="plot(sm, 'predict', conc, gases=1)")
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge