fg_feat_edge_specenr {flowGraph} | R Documentation

## Generates the SpecEnr edge feature.

### Description

Generates the SpecEnr edge feature and returns it inside the flowGraph object.

### Usage

    fg_feat_edge_specenr(fg, no_cores = 1, overwrite = FALSE)

### Arguments

`fg` | flowGraph object.
`no_cores` | An integer indicating how many cores to parallelize on.
`overwrite` | A logical variable indicating whether to overwrite the existing proportion edge feature if it exists.

### Details

Given a flowGraph object, `fg_feat_edge_SpecEnr` returns the same flowGraph object with an additional SpecEnr and expected proportions `expect_prop` `edge` feature and its meta data. The expected proportions edge feature is calculated by taking the ratio of the child nodes' (e.g. A+B+) expected proportion value over its parent nodes' (e.g. A+) actual proportion value. The SpecEnr feature is the actual over expected proportion ratio, logged. The edge feature matrix has column names <from>_<to> e.g. A+_A+B+.

### Value

flowGraph object containing the proportion edge feature.

### See Also

`flowGraph-class` `fg_feat_node_prop` `fg_feat_node_specenr` `fg_add_feature` `fg_get_feature` `fg_rm_feature` `fg_get_feature_desc`

### Examples

     no_cores <- 1
     data(fg_data_pos30)
     fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
                     prop=FALSE, specenr=FALSE,
                     no_cores=no_cores)

     fg <- fg_feat_edge_specenr(fg)

[Package flowGraph version 1.2.0 Index]