R: Identify relevant nodes without learning the Bayesian network

relevant {bnlearn} | R Documentation

## Identify relevant nodes without learning the Bayesian network

### Description

Identify all the nodes relevant to compute all the conditional probability distributions for a given set of nodes.

### Usage

      relevant(target, context, data, test, alpha, B, debug = FALSE)

### Arguments

`target` | a vector of character strings, the labels of nodes whose conditional probability distributions are of interest.
`context` | a vector of character strings, the labels of nodes on which to condition the independence tests.
`data` | a data frame containing either numeric or factor columns.
`test` | a character string, the label of the conditional independence test to be used in the algorithm. If none is specified, the default test statistic is the mutual information for categorical variables, the Jonckheere-Terpstra test for ordered factors and the linear correlation for continuous variables. See `bnlearn-package` for details.
`alpha` | a numeric value, the target nominal type I error rate. If none is specified, the default value is `0.05`.
`B` | a positive integer, the number of permutations considered for each permutation test. It will be ignored with a warning if the conditional independence test specified by the `test` argument is not a permutation test.
`debug` | a boolean value. If `TRUE` a lot of debugging output is printed; otherwise the function is completely silent.

### Value

`relevant()` returns a vector of character strings, the labels of the relevant nodes.

### Note

This algorithms selects all the nodes that are relevant at all, not only those that are significantly so. Therefore, to be discarded a node must be completely unrelated to any of the `target` nodes, not just weakly dependent. On the good side, relevant nodes are correctly identified even for data sets whose probability structure is not faithful to any directed acyclic graph.

### Author(s)

Marco Scutari

### References

Pena JM, Nilsson R, Bjorkegren J, Tegner J (2006). "Identifying the Relevant Nodes Without Learning the Model". Proceedings of the 22nd Conference on Uncertainty in Artificial Intelligence, pp. 367–374.

### Examples

    data(learning.test)
    X = as.factor(sample(c("x1", "x2"), nrow(learning.test), replace = TRUE))
    relevant("A", data = cbind(learning.test, X))
    relevant("A", context = "B", data = learning.test,)

[Package bnlearn version 4.4.1 Index]