swiss_roll | R Documentation |
This function generates data points in the shape of a Swiss roll.
swiss_roll(n, num_noise, min_n, max_n)
n |
The total number of data points to be generated. |
num_noise |
The number of additional noise dimensions to be generated. |
min_n |
The minimum value for the noise added to the data points. |
max_n |
The maximum value for the noise added to the data points. |
A matrix containing the generated Swiss roll data points.
# Generate Swiss roll data with noise with custom parameters
set.seed(20240412)
data <- swiss_roll(n = 200, num_noise = 2, min_n = -0.05, max_n = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.