Description Usage Arguments Value Examples
Generate a 2-dimensional star tree data that contain
n_samples
data points and fit a star tree with n_arms
arms.
1 | generate_2d_n_arms_star_data(n_samples, n_arms, fatness)
|
n_samples |
The number of samples to be generated. |
n_arms |
The number of arms to be generated. |
fatness |
How fat from the based star tree. |
A generated martix
. The rows and columns correspond to
samples and features.
1 2 3 4 5 6 7 8 9 10 11 | # Generate a 2-dimensional star tree data that contain 500 data points
# and fit a star tree with 3 arms. The generated data are a bit noisy but
# tree-like.
star.tree_like <- treefit::generate_2d_n_arms_star_data(500, 3, 0.1)
plot(star.tree_like)
# Generate a 2-dimensional star tree data that contain 600 data points
# and fit a star tree with 5 arms. The generated data are very noisy and
# less tree-like.
star.less_tree_like <- treefit::generate_2d_n_arms_star_data(600, 5, 0.9)
plot(star.less_tree_like)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.