Description Usage Arguments Details Value Author(s) References Examples

Call to the C++ function that grows the families.

1 | ```
grow(n, f, d, graph, scores, feat_mat, score_mat, tol, weight_mat, selected)
``` |

`n` |
Number of features to rank. |

`f` |
Number of families to grow. |

`d` |
Damping factor |

`graph` |
A matrix or data frame representation of a graph object. |

`scores` |
A numeric vector of empirical feature scores. |

`feat_mat` |
Matrix to store selected features. |

`score_mat` |
Matrix to store weighted scores of selected features. |

`tol` |
Tolerance |

`weight_mat` |
A matrix to store the cumulative weighted scores of selected futures across all families. |

`selected` |
Vector indicating whether a feature has been selected yet. |

This is the workhorse function for the Family Rank algorithm.

Returns a matrix with `1+2xn.families`

columns and `n.rank`

rows. The first column is the cumulative feature score for each of the ranked features `1:n.rank`

. The row number corresponds to the re-indexed feature index. The next `n.families`

columns contain the indices of selected features for each iteration of feature selection. The last `n.families`

columns contain the weigthed scores of selected features for each iteration.

Michelle Saul

ADD REFERENCE

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 | ```
# Toy Example
scores <- c(.6, .2, .9)
graph <- cbind(c(1,1), c(2,3), c(.4, .8))
# initialize matrices
n <- n.families <- length(scores)
feat.mat <- score.mat <- matrix(0, nrow = n, ncol = n.families)
feat.mat[1,] <- order(scores, decreasing = TRUE)
score.mat[1,] <- sort(scores, decreasing = TRUE)
# Grow families
mats <- grow(n = n, f = n.families, d = 0.5, graph = as.matrix(graph),
scores = scores,
feat_mat = feat.mat, score_mat = score.mat, tol = 0,
weight_mat = as.matrix(scores), selected = rep(1, n))
# Selected Feature Matrix
## columns represent familes
## rows represent iterations
## values indicate indices of selected features
feat.mat <- mats[, 2:(n.families+1)]
feat.mat
# Corresponding Score Matrix
## columns represent familes
## rows represent iterations
## values indicate max weighted score of selected features
score.mat <- mats[, (n.families+2):(1+2*n.families)]
score.mat
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.