initialize-method: Initialize an instance of a fitSpectra S4 class.

Description Usage Arguments Examples

Description

Initialization method of the fitSpectra class.

Initialization method of the predictClass class.

Initialization method of the simulateSpectra class.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## S4 method for signature 'fitSpectra'
initialize(.Object, m = list(0),
  modelname = "full", spectra = "diag", time = "diag",
  kerneltypeSpectra = "exponential", kerneltypeTime = "exponential",
  h = 10, s = 0.01, lambdaS = 0.3, lambdaT = 0.3,
  validation = FALSE, listLambdaS = seq(from = 0.1, to = 0.3, by =
  0.1), listLambdaT = seq(from = 0.1, to = 0.3, by = 0.1),
  model = "gaussian")

## S4 method for signature 'predictClass'
initialize(.Object, m = list(0),
  fittedCov = list(0), lambdaS = 0.3, lambdaT = 0.3,
  model = "gaussian", validation = FALSE, listLambdaS = seq(from =
  0.1, to = 10, by = 0.1), listLambdaT = seq(from = 0.1, to = 10, by =
  0.1))

## S4 method for signature 'simulateSpectra'
initialize(.Object, nbPixel = 10000,
  nbCluster = 15, nbSpectrum = 10, nbSampling = 33,
  sigma = rexp(nbSpectrum), times = c(0, 10, 20, 30, 40, 50, 60, 70,
  80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220,
  230, 240, 250, 260, 270, 280, 290, 300, 310, 321), width = 50,
  simulationType = "gaussian", modelname = "parsimonious",
  kernelSpectra = "gaussian", kernelTime = "gaussian")

Arguments

.Object

object of class fitSpectra

m

spectroscopic data

modelname

name of model to be used for calculating the covariance matrix. Available models are "full", "parsimonious". Default is "full".

spectra

type of spectra. Available models are "diag", "unknown" and "kernel". Default is "diag".

time

type of time. Available models are "diag", "unknown" and "kernel". Default is "diag".

kerneltypeSpectra

kernel to be used for covariance matrix of spectra Available kernels are "epanechnikov", "gaussian", "exponential", "uniform", "quadratic", "circular", "triangular", "rational quadratic", "inverse multiquadratic". Default is "exponential".

kerneltypeTime

kernel to be used for covariance matrix of time Available kernels are "epanechnikov", "gaussian", "exponential", "uniform", "quadratic", "circular", "triangular", "rational quadratic", "inverse multiquadratic". Default is "exponential".

h

used for kernel calculation

s

regularisation paramater for flip flop algorithm

lambdaS

regularisation for spectra for flip flop algorithm

lambdaT

regularisation for spectra for flip flop algorithm

validation

to optimize lambda or not

listLambdaS

list of lambdaS used in prediction in case validation is TRUE

listLambdaT

list of lambdaT used in prediction in case validation is TRUE

model

use in prediction in case of validation is TRUE

fittedCov

fitted covariance matrix for the data

nbPixel

number of pixels belonging to class k

nbCluster

number of cluster

nbSpectrum

number of spectra

nbSampling

number of sampling

sigma

a vector of size nbSpectrum giving the variance level of the spectrum

times

time intervals of the simulation

width

the width of the kernel to use for "gaussian" simulation. Default is 50.

simulationType

type of simulation. Available options are "gaussian" and "tstudent". Default is "gaussian".

kernelSpectra

type of kernel to be used to simulate spectra. Available options are "diag", ""epanechnikov", "gaussian", "exponential", "uniform", "quadratic" , "circular", "triangular", "rational quadratic", "inverse multiquadratic". Default is "gaussian".

kernelTime

type of kernel to be used for simulating time. Available options are "diag", ""epanechnikov", "gaussian", "exponential", "uniform", "quadratic", "circular", "triangular", "rational quadratic", "inverse multiquadratic". Default is "gaussian".

.Object

object of class predictClass

m

spectroscopic data

lambdaS

parameter for regularisation of spectra

lambdaT

parameter for regularisation of time

model

type of model to be used for prediction of labels Available models are "gaussian", "tstudent". Default is "gaussian".

validation

logical to optimize the lambda.

predicted_labels

predicted class labels

accuracy

accracy of prediction

.Object

object of class simulateSpectra

modelname

type of model to be used to build covariance matrix. Available options are "full" and "parsimonious". Default is "full".

nbSampling

number of time intervals of the simulation

gamma

degrees of freedom used for simulating "tstudent" distribution of data. Default is 3.

labels

class labels of the data

result

return a list of simulated data

Examples

1
2
m = new("simulateSpectra")
res = simulate(m)

asmitapoddar/BayesSentinel documentation built on May 10, 2019, 1:18 a.m.