Topic Assigner (STM)

Use the component to apply the model trained with the 'Topic Extractor (STM)' component. See the other component for more information.

This component integrates with the R implementation of Structural Topic Models (STM), following Roberts, Stewart and Tingley, Journal of Statistical Software (2019) (cran.r-project.org/web/packages/stm/vignettes/stmVignette.pdf), via the R library 'stm' (cran.r-project.org/web/packages/stm).

On its first execution the component is set up to automatically install R and all the required libraries. For this to work you need to install Conda (we recommend via "docs.conda.io/en/latest/miniconda.html"). KNIME Analytics Platform can automatically find the default path of where Conda is installed. You can make sure KNIME Analytics Platform is using the correct path via "File > Preferences > KNIME > Conda".

DISCLAIMER: this component won't work on Apple M1 systems as the 'stm' package is not available for 'osx-arm64' via 'conda-forge' ("anaconda.org/conda-forge/r-stm"). For Apple Intel systems manual installation of additional software might be required after the Conda Environment Propagation node executes. For details visit: docs.knime.com/latest/r_installation_guide

Options

Select Document
Select the column with preprocessed documents. Apply the Strings to Document node and any other preprocessing required (stopwords removal, stemming, ...) before this component. These nodes can be found in the KNIME Textprocessing Extension.
Seed
Seed to be adopted in the random number generator. Keep the same value to replicate results on the same input and settings.

Input Ports

Icon
The R object with the trained model. Use the component "Topic Assigner (STM)" to apply this model to new documents.
Icon
Data table with the document collection to analyze in the KNIME Textprocessing column type (use the 'Strings to Document' node first). Each row contains one document. Documents can be pre-processed (stopwords removal, stemming, ...).

Output Ports

Icon
The document collection with topic assignments and the probability for each document to belong to a certain topic. Such probabilities are taken from the gamma/theta matrix returned by the 'stm_tidiers' R function. Missing values are listed for rows with missing text or selected metadata fields/columns.

Nodes

Extensions

Links