Learn R Programming

nlpembeds (version 1.0.0)

Natural Language Processing Embeddings

Description

Provides efficient methods to compute co-occurrence matrices, pointwise mutual information (PMI) and singular value decomposition (SVD). In the biomedical and clinical settings, one challenge is the huge size of databases, e.g. when analyzing data of millions of patients over tens of years. To address this, this package provides functions to efficiently compute monthly co-occurrence matrices, which is the computational bottleneck of the analysis, by using the 'RcppAlgos' package and sparse matrices. Furthermore, the functions can be called on 'SQL' databases, enabling the computation of co-occurrence matrices of tens of gigabytes of data, representing millions of patients over tens of years. Partly based on Hong C. (2021) .

Copy Link

Version

Install

install.packages('nlpembeds')

Monthly Downloads

251

Version

1.0.0

License

GPL-3

Maintainer

Thomas Charlon

Last Published

February 4th, 2025

Functions in nlpembeds (1.0.0)

%$%

Exposition pipe
%<>%

Assignment pipe
%>%

Pipe
sql_cooc

Compute co-occurrence matrix on SQL file
spm_to_df

Write sparse matrix to dataframe
build_spm_cooc_sym

Build symmetric sparse matrix from data frame
get_svd

Compute random singular value decomposition (rSVD)
build_df_cooc

Compute monthly co-occurrence matrix
get_pmi

Compute pointwise mutual information (PMI)