post.prob: Compute posterior probabilities

Description Usage Arguments Value Author(s) Examples

Description

This is a function to compute posterior probabilities of a new instance to belong to a category given a set of observed features

Usage

1
  post.prob(object, xnew.quali, xnew.quant)

Arguments

object

is a nb object.

xnew.quali

is a vector which contains qualitative/discrete features of the new instance

xnew.quant

is a vector which contains quantitative features of the new instance

Value

The output is a vector with posterior probability of new instance for each category.

Author(s)

Renato Rodrigues Silva, renato.rrsilva@ufg.br

Examples

1
2
3
4
data(seeds)
mod =  naive.bayes(x=seeds, ct="varieties")
xnew1 = unlist(seeds[1,])[-8]
post.prob(mod,xnew.quant=xnew1)

renatorrsilva/nb documentation built on May 30, 2019, 6:14 p.m.