check_dsm: Validate Internal Structure of DSM Object (wordspace)

check.dsmR 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 (M) and/or score (S) 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 M is available

M$sparse

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

M$canonical

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

M$nonneg

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

S$ok

whether score matrix S is available

S$sparse

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

S$canonical

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

S$nonneg

whether S 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)


wordspace documentation built on Aug. 23, 2022, 1:06 a.m.