# DUE: FEBRUARY, 8
# I BEG YOU, PAY ATTENTION WHEN READING THE TASKS
# I ALSO BEG YOU TO TRY RUNNING YOUR CODE BEFORE HAND-IN
###################### I #####################
# load data from log_reg_data.txt
# you are supposed to see 500x3 matrix with columns X1, X2, Y. The last one is binary
data<- read.table("log_reg_data.txt",header = TRUE)
# 1. plot X1 and X2 against each other using different color depending on Y
# (it is better if you use ggplot for future plots)
library(ggplot2)
ggplot(data, aes(x = X1, y = X2, color = factor(Y))) +
geom_point(size = 3) +
scale_color_discrete(name = "Y")
# 2. In logistic regression the hyperplane given by b0+b1*x1+...+bm*xm=0 i