67
правок
Изменения
→Байессовская классификация
=== Байессовская классификация ===
<pre>
#importing package and it's dependencies
library(e1071)
#reading data
data<- read.csv("input.csv")
#splitting data into training and test data sets
index <- createDataPartition(y = data$target,p = 0.8,list = FALSE)
training <- data[index,]
testing <- data[-index,]
#create objects x which holds the predictor variables and y which holds the response variables
x = training[,-9]
y = training$target
model = train(x,y,'nb',trControl=trainControl(method='cv',number=10))
predictions <- predict(model,newdata = testing )
</pre>
=== Кластеризация ===
=== SVM ===