Learn R Programming

freestats (version 0.0.3)

fakedata: Generating seperatable data

Description

fakedata for algorithm like perceptron

Usage

fakedata(w, n)

Arguments

w
The w[1:d] is the normal vector of a hyperplane, w[d+1] = -c is the negative offset parameter
n
Sample size

Value

S
n by (d+1) sample matrix with last col equal to 1
y
Normal vector of the associated class labels

Examples

Run this code
fakedata(c(1,1,1),10)

Run the code above in your browser using DataLab