genTree {conjurer} R Documentation

## Generate complete m-ary connected graph

### Description

Generates an m-ary connected graph that is complete. This function is used by another internal function buildHierarchy.

### Usage

genTree(m, depth)


### Arguments

 m A positive number. This specifies the number of splits at each branch. depth A positive number. This specifies the number of levels of the tree.

### Details

This function helps in generating data that is of a tree structure. To explain further, this function generates a data where there are less number of classes i.e. branches at the top i.e. the root and increase in number and increase towards the end i.e. the leaf nodes. The number of terminal nodes are dependent on the arguments m and depth. More precisely, the number of terminal nodes has the formulation of

m^depth

. For instance, if m is 2 and depth is 3, then the number of terminal nodes are 2^3 i.e. 8.

A dataframe.