PRTools contents |
NAIVEBC
W = NAIVEBC(A,N)
W = A*NAIVEBC([],N)
W = NAIVEBC(A,DENSMAP)
W = A*NAIVEBC([],DENSMAP)
Input | |
A | Training dataset |
N | Scalar number of bins (default: 10) |
DENSMAP | Untrained mapping for density estimation |
Output | |
W | Naive Bayes classifier mapping |
The Naive Bayes Classifier estimates for every class and every feature separately. Total class densities are constructed by assuming independency and consequently multiplying the separate feature densities.
The default version divides each axis into N bins, counts the number of training examples for each of the classes in each of the bins, and classifies the object to the class that gives maximum posterior probability. Missing values will be put into a separate bin.
This routine assumes continuous data. It may be applied to discrete data in case all features have the same number of discrete values. For proper results the parameter N should be set to this number.
If N is NaN it is optimised by REGOPTC.
Alternatively an untrained mapping DENSMAP may be supplied that will be used to estimate the densities per class and per features separately. Examples are PARZENM and GAUSSM.
datasets, mappings, parzenm, gaussm, udc, qdc, parzenc, parzendc, regoptc,
PRTools contents |