Getting this error in Anaconda: Jupyter notebook R

I am getting the error below when I execute my code in R.

Error in optbin(train): could not find function "optbin" Traceback:

Below is my code:

#Read datasets
#Download the data from http://www.saedsayad.com/datasets/CreditData.zip
train <- read.csv("Credit_train.csv")
test <- read.csv("Credit_test.csv")

#Rows and Cols
dim(train)
dim(test)

#Columns name
colnames(train)
colnames(test)

#Show  
head(train)
head(test)


#------
# OneR
#------


#remove all records with missing values
train <- na.omit(train)
test <- na.omit(test)

#binning the numerical variable
train.bin <- optbin(train)

#train
model.OneR <- OneR(DEFAULT~., data = train.bin, verbose = TRUE)
summary(model.OneR)
plot(model.OneR)

#test
pc <-NULL
pc <- predict(model.OneR, test, type = "class")
eval_model(pc,test)

I have applied oneR package and it's still not working. What must I do to get this error resolved ?



from Recent Questions - Stack Overflow https://ift.tt/3ktxaal
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)