terça-feira, 3 de março de 2015

Supervised Classification, Logistic and Multinomial

http://ift.tt/1AX6AuF

We will start, in our Data Science course,  to discuss classification techniques (in the context of supervised models). Consider the following case, with 10 points, and two classes (red and blue) > clr1 <- c(rgb(1,0,0,1),rgb(0,0,1,1)) > clr2 <- c(rgb(1,0,0,.2),rgb(0,0,1,.2)) > x <- c(.4,.55,.65,.9,.1,.35,.5,.15,.2,.85) > y <- c(.85,.95,.8,.87,.5,.55,.5,.2,.1,.3) > z <- c(1,1,1,1,1,0,0,1,0,0) > df <- data.frame(x,y,z) > plot(x,y,pch=19,cex=2,col=clr1[z+1]) To get a prediction, i.e. a partition of the space in two parts, consider some logistic regression > reg=glm(z~x+y,data=df,family=binomial) > summary(reg)   Call: glm(formula = z ~ … Continue reading Supervised Classification, Logistic and Multinomial

from R-bloggers http://ift.tt/xdvlrq

Nenhum comentário:

Postar um comentário

Leave your comment here!