computeUPW {CIMICE} | R Documentation

## Up weights computation

### Description

Computes the up weights formula using a Dinamic Programming approach (starting call), see vignettes for further explaination.

### Usage

    computeUPW(g, freqs, no.of.children, A)

### Arguments

`g` | graph (a Directed Acyclic Graph)
`freqs` | observed genotype frequencies
`no.of.children` | number of children for each node
`A` | adjacency matrix of G

### Value

a vector containing the Up weights for each edge

### Examples

    require(dplyr)
    require(igraph)
    preproc <- example_dataset() %>% dataset_preprocessing
    samples <- preproc[["samples"]]
    freqs   <- preproc[["freqs"]]
    labels  <- preproc[["labels"]]
    genes   <- preproc[["genes"]]
    g <- graph_non_transitive_subset_topology(samples, labels)
    # prepare adj matrix
    A <- as.matrix(as_adj(g))
    # pre-compute exiting edges from each node
    no.of.children <- get_no_of_children(A,g)
    computeUPW(g, freqs, no.of.children, A)

[Package CIMICE version 1.2.1 Index]