Skip to content

NB documentation and cross validation #1010

Description

@cschwem2er

Hi,

the documentation for textmodel_NB does not include explanations for the different priors, although this is stated in the arguments:

prior	prior distribution on texts; see Details

And loosely related to this: Do you have any recommendations for using cross validation with quanteda textmodels? At the moment I manually split the data into training and testset, but it would be very handy to have a quanteda function for CV.

Edit: I also noticed that for distrubition = 'Bernoulli', the underlying code seems to automatically convert the dfm to binary:

 else if (object$distribution == "Bernoulli") {

        newdata <- tf(newdata, "boolean")
        Nc <- length(object$Pc)

If so, the related suggestion in the documentation could be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions