daily log 10.19.20
Left off HERE
R Doc HERE
THREE THINGS:
- The question is just asking for the error rate using random data.
- First step to answering the question is to generate that random data
- The
col
in theplot(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)