Learn R Programming

corpustools (version 0.5.1)

laplace: Laplace (i.e. add constant) smoothing

Description

Laplace (i.e. add constant) smoothing

Usage

laplace(freq, add = 0.5)

Value

A numeric vector with the smoothed term proportions

Arguments

freq

A numeric vector of term frequencies (integers).

add

The added value

Examples

Run this code
laplace(c(0,0,1,1,1,2,2,2,3,3,4,7,10))

Run the code above in your browser using DataLab