This function removes points outside of a elliptical region
Value
A data frame with three+n_vars columns, like:
- x
Random uniform coordinate
- y
Random uniform coordinate
- class
Binary class label ("Above" or "Below")
Examples
coords <- matrix(c(0.2, 0.3,
0.4, 0.5,
0.6, 0.7), ncol = 2, byrow = TRUE)
df <- create_data(coord = coords, n_samples = 500, seed = 717)
df <- trim_shape(df)
plot(df$x, df$y, col=ifelse(df$class == "Above", "red", "yellow"))