getNBProbabilities: Get Naive-Bayes Probabilities

Description Usage Arguments Value

View source: R/getNBProbabilities.R

Description

This function computes the Naive-Bayes estimates of p(x|+) and p(x|-) for a given x.

Usage

1
getNBProbabilities(object, newdata, threshold = 0.001, eps = 0)

Arguments

object

an object of class naiveBayes containing at least the tables of the likelihood of each word in the trained model.

newdata

a dataframe containing the x for which we wanto to calculate p(x|+) and p(x|-).

threshold

value assigned to strictly probabilities <= eps.

eps

Threshold for low probabilities.

Value

This function returns a matrix containg * p(x|-) = Under the label 0. * p(x|+) = Under the label 1.


roinaveiro/acAra documentation built on May 27, 2019, 1:47 p.m.