Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dataSet <- read.csv("creditcard_german.csv", header=FALSE)
- # ... split into trainSet and testSet ...
- trainSet[] <- lapply(trainSet, as.factor)
- testSet[] <- lapply(testSet, as.factor)
- # V25 is the class variable
- bn = naive.bayes(trainSet, training = "V25")
- fitted = bn.fit(bn, trainSet, method = "bayes")
- pred = predict(fitted , testSet)
- ...
Add Comment
Please, Sign In to add comment