\HeaderA{set.default.parameters}{Get/set hyperparameters}{set.default.parameters}
\keyword{graphs}{set.default.parameters}
\keyword{models}{set.default.parameters}
\begin{Description}\relax
Allows to set and retrieve various hyperparameters for different inference methods.
\end{Description}
\begin{Usage}
\begin{verbatim}
set.default.parameters(Sgenes, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{Sgenes}] character vector of S-gene identifiers
\item[\code{...}] parameters to set (see details)
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Since version 2.5.4 functions in the nem package do not have any more a large amount of individual parameters. Instead there is just one hyperparameter, which is passed to all functions. Parameter values with the hyperparameter can be set with this function.
\describe{
\item[type] \code{mLL} or \code{FULLmLL} or \code{CONTmLL} or \code{CONTmLLBayes} or \code{CONTmLLMAP} or \code{gnem}. \code{CONTmLLDens} and \code{CONTmLLRatio} are identical to \code{CONTmLLBayes} and \code{CONTmLLMAP} and are still supported for compatibility reasons. \code{mLL} and \code{FULLmLL} are used for binary data (see \code{BoutrosRNAiDiscrete}) and \code{CONTmLL} for a matrix of effect probabilities. \code{CONTmLLBayes} and \code{CONTmLLMAP} are used, if log-odds ratios, p-value densities or any other model specifies effect likelihoods. \code{CONTmLLBayes} refers to an inference scheme, were the linking positions of effect reporters to network nodes are integrated out, and \code{CONTmLLMAP} to an inference scheme, were a MAP estimate for the linking positions is calculated. \code{gnem} indicates Generalized Nested Effects Models (GNEMs).
\item[para] vector of length two: false positive rate and false negative rate for binary data. Used by \code{mLL} 
\item[hyperpara] vector of length four: used by \code{FULLmLL()} for binary data
\item[Pe] prior of effect reporter positions in the phenotypic hierarchy (same dimension as D). Not used type \code{gnem}. Default: NULL
\item[Pm] prior over models (n x n matrix). Default: NULL
\item[Pmlocal] local model prior for pairwise and triple learning. For pairwise learning generated by \code{local.model.prior} according to arguments \code{local.prior.size} and \code{local.prior.bias}
\item[local.prior.size] prior expected number of edges in the graph (for pairwise learning). Default: no. nodes
\item[local.prior.bias] bias towards double-headed edges. Default: 1 (no bias; for pairwise learning)
\item[triples.thrsh] threshold for model averaging to combine triple models for each edge. Default: 0.5
\item[lambda] regularization parameter to incorporate prior assumptions. May also be a vector of possible values, if \code{nemModelSelection} is used, Default: 0 (no regularization)
\item[delta] regularization parameter for automated  subset selection of effect reporters (CONTmLLMAP only). Default: 1/no. nodes
\item[selEGenes] automated E-gene subset selection (includes tuning of delta for CONTmLLMAP). Default: FALSE  
\item[trans.close] Should always transitive closed graphs be computed? Default: TRUE. NOTE: This has only an impact for type  \code{nem.greedyMAP} and \code{gnem}. Default: TRUE
\item[backward.elimination] For module networks and greedy hillclimbing inference: Try to eliminate edges increasing the likelihood. Works only, if trans.close=FALSE. Default: FALSE 
\item[mode] For Bayesian network inference and GNEMs: \code{binary\_ML}: effects come from a binomial distribution - ML learning of parameters (Bayesian networks only); \code{binary\_Bayesian}: effects come from a binomial distribution - Bayesian learning of parameters (Bayesian networks only); \code{continous\_ML}: effects come from a normal distribution - ML learning of parameters; \code{continous\_Bayesian}: effects come from a normal distribution - Bayesian learning of parameters.
\item[nu.intervention, lambda.intervention] For \code{gnem}: For any perturbed node we suppose the unknown mean mu given its unknown variance sigma2 to be drawn from N(nu.intervention, sigma2/lambda.intervention). Default: nu.intervention=0.6, lambda.intervention=4
\item[nu.no\_intervention, lambda.no\_intervention] The same parameters for unperturbed nodes. Default: nu.no\_intervention=0.95, lambda.no\_intervention=4
\item[df.intervention, scale.intervention] For \code{gnem}: The unknown variance sigma2 for perturbed nodes is supposed to be drawn from Inv-$\chi\textasciicircum{}2$(df.intervention, scale.intervention). Default: df.intervention=4.4, scale.intervention=4.4
\item[df.no\_intervention, scale.no\_intervention] The same parameters for unperturbed nodes. Default: df.no\_intervention=4.4, scale.no\_intervention=0.023
\item[map] For \code{gnem}: Mapping of interventions to network nodes. The format is a named list of strings with names being the interventions and entries being the network nodes. Default: Entries and names are the network nodes. 
\item[outputdir] Directory where to put diagnostic plots. Default: folder "QualityControl" in current working directory
\item[debug] Print out or plot diagnostic information. Default: FALSE

}
\end{Details}
\begin{Value}
A list containing all parameters described above.
\end{Value}
\begin{Author}\relax
Holger Froehlich \textless{}URL: http:/www.dkfz.de/mga2/people/froehlich\textgreater{}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
control = set.default.parameters(LETTERS[1:5], type="CONTmLLBayes", selEGenes=TRUE) # set inference type and whether to use automatic E-gene selection for a network with nodes "A"-"E".
\end{ExampleCode}
\end{Examples}

