File: consensus_tree.Rd

package info (click to toggle)
r-cran-igraph 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,044 kB
  • sloc: ansic: 204,981; cpp: 21,711; fortran: 4,090; yacc: 1,229; lex: 519; sh: 52; makefile: 8
file content (56 lines) | stat: -rw-r--r-- 2,339 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hrg.R
\name{consensus_tree}
\alias{consensus_tree}
\title{Create a consensus tree from several hierarchical random graph models}
\usage{
consensus_tree(graph, hrg = NULL, start = FALSE, num.samples = 10000)
}
\arguments{
\item{graph}{The graph the models were fitted to.}

\item{hrg}{A hierarchical random graph model, in the form of an
\code{igraphHRG} object. \code{consensus_tree()} allows this to be
\code{NULL} as well, then a HRG is fitted to the graph first, from a
random starting point.}

\item{start}{Logical, whether to start the fitting/sampling from the
supplied \code{igraphHRG} object, or from a random starting point.}

\item{num.samples}{Number of samples to use for consensus generation or
missing edge prediction.}
}
\value{
\code{consensus_tree()} returns a list of two objects. The first
is an \code{igraphHRGConsensus} object, the second is an
\code{igraphHRG} object.  The \code{igraphHRGConsensus} object has the
following members:
\item{parents}{For each vertex, the id of its parent vertex is stored,
or zero, if the vertex is the root vertex in the tree. The first n
vertex ids (from 0) refer to the original vertices of the graph, the
other ids refer to vertex groups.}
\item{weights}{Numeric vector, counts the number of times a given tree
split occurred in the generated network samples, for each internal
vertices. The order is the same as in the \code{parents} vector.}
}
\description{
\code{consensus_tree()} creates a consensus tree from several fitted
hierarchical random graph models, using phylogeny methods. If the \code{hrg()}
argument is given and \code{start} is set to \code{TRUE}, then it starts
sampling from the given HRG. Otherwise it optimizes the HRG log-likelihood
first, and then samples starting from the optimum.
}
\seealso{
Other hierarchical random graph functions: 
\code{\link{fit_hrg}()},
\code{\link{hrg}()},
\code{\link{hrg-methods}},
\code{\link{hrg_tree}()},
\code{\link{predict_edges}()},
\code{\link{print.igraphHRG}()},
\code{\link{print.igraphHRGConsensus}()},
\code{\link{sample_hrg}()}
}
\concept{hierarchical random graph functions}
\section{Related documentation in the C library}{\href{https://igraph.org/c/html/latest/igraph-HRG.html#igraph_hrg_consensus}{\code{igraph_hrg_consensus()}}.}