Validate the internal structure of a DSM object and return a list with information about the object.
check.dsm(model, validate = FALSE, nonneg.check = FALSE)an object of class dsm
carry out extended validation of internal consistency? (may be expensive)
if TRUE, check the co-occurrence (\(M\)) and/or score (\(S\)) matrix for non-negativity (may be expensive)
Aborts with error message if any inconsistency is detected. Otherwise a list with the following items is returned:
number of rows (target terms) of the DSM
number of columns (features) of the DSM
sample size of the underlying data set (may be NA)
whether co-occurrence frequency matrix \(M\) is available
whether \(M\) is sparse or dense (only present if M$ok)
whether \(M\) is in canonical DSM format (only present if M$ok)
whether \(M\) is non-negative (only present if M$ok, and may be NA unless nonneg.check=TRUE was specified)
whether score matrix \(S\) is available
whether \(S\) is sparse or dense (only present if S$ok)
whether \(S\) is in canonical DSM format (only present if S$ok)
whether \(S\) is non-negative (only present if S$ok, and may be NA unless nonneg.check=TRUE was specified)
TRUE if matrix combines data with inconsistent row or column marginals (in this case, association scores cannot be computed any more)
# NOT RUN {
check.dsm(DSM_TermTerm)
# }
Run the code above in your browser using DataLab