-1

I am just a beginner in using R. What I want is to use Support Vector Machine in R to predict/classify the status of bank. I also normalized my data already...

I divided my data into 2 parts: training and test part like this: (I have 7260 observations):

prediction1_train<-prediction1_n[1:5000, ]
prediction1_test<-prediction1_n[5001:7260, ]
prediction1_train_target<-prediction1[1:5000,7]
prediction1_test_target<-prediction1[5001:7260,7]
install.packages("e1071")

I've chosen

chooseCRANmirror()

but when I applied

model<-ksvm(STT~.,data=prediction1_train,kernel="linear",cost=10,scale=FALSE)

Error: could not find function "ksvm"

So, pleased help me and tell me what should I do.

Hanh Hong LE
  • 1
  • 1
  • 1

1 Answers1

2

ksvm() is a part of kernlab library. You need to install kernlab package before executing your code.

install.packages("kernlab")
library(kernlab)

You can find more details at this link.

kthornbloom
  • 3,660
  • 2
  • 31
  • 46
Nim J
  • 993
  • 2
  • 9
  • 15