daily log 10.22.20

less than 1 minute read

CHAPTER 9

set.seed(10111)
# MAKE 20 OBSERVATIONS in TWO classes on TWO variables
x=matrix(rnorm(40),20,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,]+1
# COL = COLOR
plot(x,col=y+6,pch=19)

ADDITIONAL RESOURCES

datascience/chapter9.ipynb at master · luigiselmi/datascience

Support Vector Machines Using svm() function