Description Usage Arguments Value Examples
View source: R/makeCorrelationImageProblem.R
This benchmark is motivated by http://guessthecorrelation.com/. The task is to assess the correlation between two variables visually by a scatterplot of sampled points. Each observation is generated as follows:
A random correlation value is drawn uniformly between -1 and 1.
points.per.image
points are sampled from a bivariate normal distribution with zero mean, sampled correlation and a marginal variance of 1.
The observations are scaled between 0 and 1.
An image of the data is generated and saved in a given resolution and pointsize.
The values of the pixels are returned as a vector with the correlation as target.
1 2 | makeCorrelationImageProblem(n = 5000L, resolution = c(32, 32),
points.per.image = 100, pointsize = 2, create.task = TRUE)
|
n |
[ |
resolution |
[ |
points.per.image |
[ |
pointsize |
[ |
create.task |
[ |
RegrTask
| data.frame
.
1 2 | data = makeCorrelationImageProblem(n = 20, create.task = FALSE)
image(matrix(as.numeric(data[1, -1]), ncol = 32))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.