daily log 10.19.20

less than 1 minute read

Left off HERE

R Doc HERE

THREE THINGS:

  1. The question is just asking for the error rate using random data.
  2. First step to answering the question is to generate that random data
  3. The col in the plot(x,col=y+6,pch=16) stands for COLOR not COLUMN
set.seed(10111)
# MAKE 20 OBSERVATIONS in TWO classes on TWO variables
x=matrix(rnorm(100),50,2)
# MAKE A Y VARIABLE (either -1 or 1),
# 10 in each class
y=rep(c(-1,1),c(10,10))
# We are moving the means from 0 to 1 (WHY!?)
x[y==1,]=x[y==1,]+3
# COL = COLOR
plot(x,col=y+6,pch=19)