Learn R Programming

treemisc (version 0.0.1)

gen_friedman1: Friedman benchmark data

Description

Simulate data from the Friedman 1 benchmark problem. See mlbench.friedman1 for details and references.

Usage

gen_friedman1(n = 100, nx = 10, sigma = 0.1)

Value

A data frame with n rows and nx + 1 columns (for nx features and the response).

Arguments

n

Integer specifying the number of samples (i.e., rows) to generate. Default is 100.

nx

Integer specifying the number of predictor variables to generate. Default is 10. Note that nx >= 5.

sigma

Numeric specifying the standard deviation of the standard Gaussian noise.

Examples

Run this code
set.seed(2319)  # for reproducibility
friedman1 <- gen_friedman1(nx = 5)
pairs(friedman1, col = "purple2")

Run the code above in your browser using DataLab