Skip to content

Error in predict.textmodel_wordscores(x, rescaling = "mv") #1251

Description

@kbenoit

Seems to be hardwired to consider the first two reference documents as the rescaling anchors.

refscores <- rep(NA, ndoc(data_dfm_lbgexample))
refscores[which(docnames(data_dfm_lbgexample) == "R1")] <- -1
refscores[which(docnames(data_dfm_lbgexample) == "R5")] <- 1
refscores

ws1999 <- textmodel_wordscores(data_dfm_lbgexample, refscores, 
                               scale = "linear", smooth = 1)
predict(ws1999, rescaling = "mv")
#        R1        R2        R3        R4        R5        V1 
# -1.000000  1.000000  9.234259 17.468518 19.468518  3.663697 

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