NaiveBayes
##### Naive Bayes is a Supervised Machine Learning algorithm based on the Bayes Theorem that is used to solve classification problems by following a probabilistic approach. It is based on the idea that the predictor variables in a Machine Learning model are independent of each other. Meaning that the outcome of a model depends on a set of independent variables that have nothing to do with each other. In real-world problems, predictor variables aren’t always independent of each other, there are always some correlations between them. Since Naive Bayes considers each predictor variable to be independent of any other variable in the model, it is called ‘Naive’.##### The NaiveBayes function takes in numeric or factor variables in a data frame or a numeric matrix. ##### It"s important to note that single vectors will not work for the input data but will work for the dependent variable (Y).##### Factor variables and Character variables are accepted.##### Character variables are coerced into Factors.##### Numeric variables will be placed on a normal distribution.##### Then the numeric variable will be converted into a probability on that distribution.##### The formula is traditional Y~X1+X2+…+Xn##### The data is typically a dataframe of numeric or factor variables.##### laplace provides a smoothing effect (as discussed below)##### subset lets you use only a selection subset of your data based on some boolean filter##### na.action lets you determine what to do when you hit a missing value in your dataset.