classify: Classify instances into groups based on posterior...

Description Usage Arguments Value Author(s) Examples

Description

This is a function to classify instances into groups predefined based on naive Bayes model

Usage

1
classify(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 the label of more likely group for a new instance

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]
classify(mod,xnew.quant = xnew1)

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