Say I have the following in R
rm(list=ls())
set.seed(1000)
n<-20
x<-rnorm(n, 0.5,1)
y<-rnorm(n, 0.5,1)
type<-rep(2,n)
df1<-data.frame(x,y,type)
x<-rnorm(n, -0.5,1)
y<-rnorm(n, -0.5,1)
type<-rep(5,n)
df0<-data.frame(x,y,type)
df<-merge(x=df0,y=df1,all=T)
plot(df$x,df$y,col=df$type)
Now as you can see I have classes that overlap -- say the cost of classifying the red class incorrectly is 10 times the cost of classifying the blue class incorrectly.
Say I want to use a logistic regression -- how would I do incorporate the cost into my logistic regression model?