Not able to fix the below error for the below logistic regression
training=(IBM$Serial<625)
data=IBM[!training,]
dim(data)
stock.direction <- data$Dire
I was getting the same error "Error in eval(family$initialize) : y values must be 0 <= y <= 1" and solved it by adding "stringsAsFactors=T" to the red.csv function.
BEFORE : gene.train = read.csv("gene.train.csv", header=T) # error
AFTER : gene.train = read.csv("gene.train.csv", header=T, stringsAsFactors=T) # no error.