set.seed(400)
random <- createDataPartition(mldata.knn$Transport, p=0.70,list = F)
mldata_train <- mldata.knn[random,]
mldata_test <- mldata.knn[-random,]
print(table(mldata.knn$Transport))
print(table(mldata_train$Transport))
library(e1071)
NB_model = naiveBayes(mldata.knn$Gender ~., data = mldata_train)
print(NB_model)
Error in model.frame.default(formula = mldata.knn$Gender ~ ., data = mldata_train, : variable lengths differ (found for 'Age')