View source: R/copy_param_hypervolume.R
copy_param_hypervolume | R Documentation |
copy_param_hypervolume
takes in a hypervolume and data. After detecting the method used to generate the input hypervolume, the function returns a new hypervolume generated from the data using the same method and parameters as the input hypervolume.
copy_param_hypervolume(hv, data, name = NULL)
hv |
hypervolume object |
data |
A m x n matrix or data frame, where m is the number of observations and n is the dimensionality. |
name |
String name of hypervolume |
copy_param_hypervolume
only works if the input hypervolume was generated using method = "box"
, method = "gaussian"
, or method = "svm"
. Calling this function on hypervolumes generated from hypervolume_set
will result in an error.
Note that kde.bandwidth
is affected by size of the data and will be re-estimated using whichever method was used to generate the original bandwidth if method = "gaussian"
or method = "box"
.
Use hv@Parameters
to see what parameters are copied from the input hypervolume.
hypervolume object
## Not run:
library(palmerpenguins)
data("penguins")
bill_data = na.omit(penguins[,3:4])
hv = hypervolume(data = bill_data,
method = "gaussian",
quantile.requested = .9,
quantile.requested.type = "volume")
# Generates a new hypervolume using the same hypervolume and data
hv_copy = copy_param_hypervolume(hv, hv@Data)
# Check to see that the information of the two hypervolumes is the same
print(hv)
print(hv_copy)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.