The best subnetworks

Share:

Description

Search best subnetworks that maximize given objective functions.

Usage

1
2
best_subnets(func, net.matrix, max.size = 10, exhaust.size = 5,
  max.top = 10000)

Arguments

func

The objective function to maximize

net.matrix

The adjacent matrix of network

max.size

The maximal size of subnetworks

exhaust.size

The maximal size of subnetworks that use exhaustive searching strategy

max.top

The maiximal number of top candidates kept for evaluation of next size, used in heuristic searching strategy

Details

Enumerate and search the best subnetworks that maximize given objective function. If the size of subnetworks <= exhaust.size, exact exhaustive searching is applied, otherwise, heuristic searching algorithm is used.

Value

A list with the following two components:

subnets

The list of top subnetworks in different sizes

obj.values

The list of objective values of corresponding subnetworks

See Also

get_subnets, extend_subnets

Examples

1
2
3
4
5
6
library(Corbi)
net <- matrix(FALSE, nrow=10, ncol=10)
net[sample.int(100, 20)] <- TRUE
net <- net | t(net)
func <- function(subnet) max(subnet) - min(subnet)
result <- best_subnets(func, net, 5)