Learn R Programming

mtk (version 1.0)

mtkDefaultAnalyser-class: The mtkDefaultAnalyser class

Description

The mtkDefaultAnalyser class is a sub-class of the class mtkAnalyser. It provides all the slots and methods defined in the class mtkAnalyser. The mtkDefaultAnalyser class is used when the method used for the sensitivity analysis is the same as the method used for the experiment design.

Arguments

Class Hierarchy

Parent classes :
mtkAnalyser
Direct Known Subclasses :

Constructor

mtkDefaultAnalyser
signature()

Slots

name:
(character) always takes the string "analyze".
protocol:
(character) a string to name the protocol used to run the process: http, system, R, etc.
site:
(character) a string to indicate where the service is located.
service:
(character) a string to name the service to invoke.
parameters:
(vector) a vector of [mtkParameter] containing the parameters to pass while calling the service.
ready:
(logical) a logical to tell if the process is ready to run.
state:
(logical) a logical to tell if the results produced by the process are available and ready to be consumed.
result:
(ANY) a data holder to hold the results produced by the process

Methods

setName
signature(this = "mtkDefaultAnalyser", name = "character"): Not used, method inherited from the parent class.
setParameters
signature(this = "mtkDefaultAnalyser", f = "vector"): Assigns new parameters to the process.
getParameters
signature(this = "mtkDefaultAnalyser"): Returns the parameters as a named list.
is.ready
signature( = "mtkDefaultAnalyser"): Tests if the process is ready to run.
setReady
signature(this = "mtkDefaultAnalyser", switch = "logical"): Makes the process ready to run.
is.ready
signature( = "mtkDefaultAnalyser"): Tests if the results produced by the process are available.
setReady
signature(this = "mtkDefaultAnalyser", switch = "logical"): Marks the process as already executed.
getResult
signature(this = "mtkDefaultAnalyser"): Returns the results produced by the process as a mtkAnalyserResult.
getData
signature(this = "mtkDefaultAnalyser"): Returns the results produced by the process as a data.frame.
serializeOn
signature(this = "mtkDefaultAnalyser"): Returns all data managed by the process as a named list.
run
signature(this = "mtkDefaultAnalyser", context= "mtkExpWorkflow"): Runs the sensitivity analysis defined in the context.
summary
signature(object = "mtkDefaultAnalyser"): Provides a summary of the results produced by the process.
print
signature(x = "mtkDefaultAnalyser"): Prints a report of the results produced by the process.
plot
signature(x = "mtkDefaultAnalyser"): Reports graphically the results produced by the process.
report
signature(this = "mtkDefaultAnalyser"): Reports the results produced by the process.

References

J. Wang, H. Richard, R. Faivre, H. Monod (2013). Le package mtk, une bibliothèque R pour l'exploration numérique des modèles. In: Analyse de sensibilité et exploration de modèles : Application aux sciences de la nature et de l'environnement (R. Faivre, B. Iooss, S. Mahévas, D. Makowski, H. Monod, Eds). Editions Quae, Versailles.

Examples

Run this code
# Create a designer and an analyser avec the method "Morris"
# to analyze the model "Ishigami":

# Specify the factors to analyze:
	x1 <- make.mtkFactor(name="x1", distribName="unif",
		 distribPara=list(min=-pi, max=pi)) 
	x2 <- make.mtkFactor(name="x2", distribName="unif",
   	  distribPara=list(min=-pi, max=pi)) 
	x3 <- make.mtkFactor(name="x3", distribName="unif", 
   	  distribPara=list(min=-pi, max=pi)) 
		factors <- mtkExpFactors(list(x1,x2,x3)) 
# Build the processes:
#   1) the experimental design process with the method "Morris".
	exp1.designer <- mtkNativeDesigner(design = "Morris",
		 information=list(r=20,type="oat",levels=4,grid.jump=2)) 

#   2) the model simulation process with the model "Ishigami".
	exp1.evaluator <- mtkNativeEvaluator(model="Ishigami") 

#   3) the analysis process with the default method.
#      Here, it is the "Morris" method.
	exp1.analyser <- mtkDefaultAnalyser()

# Build the  workflow with the processes defined previously.
	exp1 <- mtkExpWorkflow(expFactors=factors,
	    processesVector = c(design=exp1.designer,
		evaluate=exp1.evaluator, analyze=exp1.analyser))
		
# Run the workflow and report the results.
	run(exp1)
	print(exp1)

Run the code above in your browser using DataLab