Description Usage Arguments Details Author(s) Examples
Generates data that can be classified as +1 or -1 based on a linear classifier defined by a vector of weights w.
1 | gendat_percep(n, w, ...)
|
n |
Sample size. |
w |
A vector of weights defining the linear classifier. The first element of the vector is the bias parameter b. |
... |
Arguments to pass to |
Randomly generates the data matrix \mathbf{X} and vector \mathbf{y} using a threshold function: if \mathbf{X}_{n \times k} \mathbf{w}_{k \times 1} > 0 then \mathbf{y}_{n \times 1} = +1 and if \mathbf{X}_{n \times k} \mathbf{w}_{k \times 1} < 0 then \mathbf{y}_{n \times 1} = -1.
Ivan Jacob Agaloos Pesigan
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.