Description Usage Arguments Value Examples
fit is used to fit the Naive Bayes Classifier model. It can compute with all types of variables, applying discretisation on quantitative variables and need a qualitative predictive variable.
1 |
formula |
an object of class formula. |
data |
a dataframe containing the variables in the model. |
laplace |
an integer that will be use to do the Laplace smoothing. |
parallel |
a logic that allow the user to compute the function using parallel computation. |
an NBAYES object containing several information that can be useful for the user and had to pass to the predict function. The informations depends if the fit had to discretize or not. For both cases the fit return:
NBAYES$table_proba_cond, a table containing he conditionnal probabilities
NBAYES$prior, a table full by the prior probabilities
Plus, if discretization occured:
NBAYES$condition, a dataframe with names of the column that was discretize and their column number
NBAYES$cuts, a list of cuts made by discretization
NBAYES$var_a_predire, the name of the variable to predict
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.