check.dsm {wordspace}R Documentation

Validate Internal Structure of DSM Object (wordspace)

Description

Validate the internal structure of a DSM object and return a list with information about the object.

Usage


check.dsm(model, validate = FALSE, nonneg.check = FALSE)

Arguments

model

an object of class dsm

validate

carry out extended validation of internal consistency? (may be expensive)

nonneg.check

if TRUE, check the co-occurrence (MM) and/or score (SS) matrix for non-negativity (may be expensive)

Value

Aborts with error message if any inconsistency is detected. Otherwise a list with the following items is returned:

nrow

number of rows (target terms) of the DSM

ncol

number of columns (features) of the DSM

N

sample size of the underlying data set (may be NA)

M$ok

whether co-occurrence frequency matrix MM is available

M$sparse

whether MM is sparse or dense (only present if M$ok)

M$canonical

whether MM is in canonical DSM format (only present if M$ok)

M$nonneg

whether MM is non-negative (only present if M$ok, and may be NA unless nonneg.check=TRUE was specified)

S$ok

whether score matrix SS is available

S$sparse

whether SS is sparse or dense (only present if S$ok)

S$canonical

whether SS is in canonical DSM format (only present if S$ok)

S$nonneg

whether SS is non-negative (only present if S$ok, and may be NA unless nonneg.check=TRUE was specified)

locked

TRUE if matrix combines data with inconsistent row or column marginals (in this case, association scores cannot be computed any more)

Author(s)

Stephanie Evert (https://purl.org/stephanie.evert)

See Also

dsm, print.dsm

Examples


check.dsm(DSM_TermTerm)


[Package wordspace version 0.2-8 Index]