sim_response_xy | R Documentation |
Generate data sets to apply binary classifiers
sim_response_xy( n = 500, x_dist = purrr::partial(runif, min = -1, max = 1), y_dist = x_dist, relationship = function(x, y) x > y, noise = 0.2 )
n |
An integer |
x_dist |
A random number generation function. |
y_dist |
A random number generation function. |
relationship |
A function specify the relationship between x, y and the response. A function f(x, y) need return a logical value. |
noise |
A number between 0 and 1. |
set.seed(123) df <- sim_response_xy(n = 500) df plot(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.