fit.nb: Function fit.nb implements model building algorithm of Naive...

Description Usage Arguments Value Examples

Description

Bernoulli model is equivalent to the binary independence model, which generates an indicator for each term of the vocabulary, either 1 indicatingpresence of the term in the document or 0 indicating absence. (we're using bernoulli distribution for conditional probabilities p(F|c) calculation ) More information about algorithm can be found in the book Introduction to Information Retrieval (p.253-265)

Usage

1
fit.nb(data, fact, p = -1)

Arguments

data

data.frame contains values of our training set

fact

Factor categories list pointing the right classification of the data (one per sample)

p

m-estimation constrant

Value

object klasy mcTbnb do uzycia w funkcji predict

Examples

1
2
fit.nb(train.data, label)
fit.nb(train.data, label, p=5)

vovkaOst/TextClassifier documentation built on May 3, 2019, 6:41 p.m.