7 Developer Notes
This section provides information for developers on the structure of the code, as well as any package and function dependencies.
7.1 Internal Functions
- internalNBC: execute and return the details of the naive bayes classifier algorithm
- internalCheckNBC: checks the
nbc()
function arguments - internalCheckNBCSummary: checks the
summary.nbc()
function arguments - internalGetCSMFMaxError: calculates the CSMF maximum error given the observed cases
- internalGetCSMFAcc: calculates the CSMF accuracy given the predicted and observed cases of any length
- Dependencies:
internalGetCSMFMaxError()
- Dependencies:
- internalGetCauseMetrics: creates a dataframe of particular metrics for each cause
- internalGetMetrics: creates a vector of overall metrics given the observed and predicted cases
- Dependencies:
internalGetCSMFMaxError()
,internalGetCSMFAcc()
- Dependencies:
- internalSubAsRest: substitute a target value for the rest of the values by their distribution per column
- Dependencies:
internalRoundFixedSum()
- Dependencies:
- internalRoundFixedSum: round a vector of values to whole numbers while preserving their sum
7.2 External Functions
- nbc: main function for running the naive bayes classifier
- Dependencies:
internalCheckNBC()
,internalNBC()
- Dependencies:
- summary.nbc: consumes output from
nbc()
to calculate informative metrics- Dependencies:
internalCheckNBCSummary()
,internalGetCauseMetrics()
,internalGetMetrics()
,internalGetCSMFMaxError()
,internalGetCSMFAcc()
- Dependencies:
- print.nbc_summary: consumes output from
summary.nbc()
to print a message of the top causes- Dependencies:
summary.nbc()
,nbc()
- Dependencies:
- plot.nbc: consumes output from
nbc()
to plot the top causes- Dependencies:
summary.nbc()
,nbc()
- Dependencies:
- nbc4vaIO: file input and output for the main package functions
- Dependencies:
summary.nbc()
,nbc()
- Dependencies:
- nbc4vaGUI: graphical user interface to run the main package functions
- Dependencies:
nbc4vaIO()
- Required Packages: shiny
- Dependencies:
- csmf.nbc: consumes output from
nbc()
to get the predicted csmfs- Dependencies:
nbc()
,summary.nbc()
- Dependencies:
- topCOD.nbc: consumes output from
nbc()
to get the top predictions- Dependencies:
nbc()
- Dependencies: