Guest User

Untitled

a guest
Apr 26th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. dataSet <- read.csv("creditcard_german.csv", header=FALSE)
  2. # ... split into trainSet and testSet ...
  3.  
  4. trainSet[] <- lapply(trainSet, as.factor)
  5. testSet[] <- lapply(testSet, as.factor)
  6.  
  7. # V25 is the class variable
  8. bn = naive.bayes(trainSet, training = "V25")
  9. fitted = bn.fit(bn, trainSet, method = "bayes")
  10. pred = predict(fitted , testSet)
  11.  
  12. ...
Add Comment
Please, Sign In to add comment