Icon

00_Topic_Modeling_with_Verified_Components

Topic Modeling with Verified Components

In this workflow you can see how these 4 components can be adopted in combination with the Topic Extractor (Parallel LDA) node.
Right click on the Topic Explorer Views to open the interactive views.

Read more on the component pages at knime.com/verified-components. References are also available below in this workflow page.



Annotations and comments
  • 01 Documents Data Preparation
  • 02 Documents Data Preparation
  • 03 Training
  • ChatGPT says: Exclusivity: Definition: Exclusivity measures how exclusive a word is to a particular topic. In other words, it gauges how much a word appears in one topic compared to its appearance in other topics. Interpretation: A higher exclusivity score for a word in a topic means that the word is more specific to that topic and less likely to appear in other topics. This can help in distinguishing topics from one another. Cutoff: If you're using exclusivity as a metric to determine the best number of topics, you might look for a balance where topics have a good number of exclusive words but are still interpretable. Too high exclusivity might lead to very narrow topics, while too low might make topics overlap significantly. Semantic Coherence: Definition: Semantic coherence evaluates how top words of a topic co-occur in the corpus. It gives an idea of how meaningful and interpretable a topic is. Interpretation: Higher semantic coherence indicates that the top words of the topic frequently appear together in the documents, suggesting that the topic is coherent and likely meaningful. Cutoff: A higher semantic coherence is generally desirable. When determining the number of topics, you might look for a point where adding more topics doesn't significantly improve coherence or even reduces it. Heldout Likelihood: Definition: This is a measure of how well the topic model predicts unseen documents. A portion of the corpus is "held out" or set aside, and the trained model's likelihood on this held-out set is computed. Interpretation: A higher heldout likelihood indicates that the model generalizes well to unseen documents. Cutoff: You'd typically want a higher heldout likelihood. When selecting the number of topics, you might look for a point where the likelihood starts to plateau or decrease, indicating overfitting. Residual Variance: Definition: In the context of topic modeling, residual variance can refer to the unexplained variance in the data after accounting for the topics. It's a measure of how much information the topics aren't capturing. Interpretation: Lower residual variance indicates that the topics capture more of the structure in the data. Cutoff: You'd generally want a lower residual variance. When determining the number of topics, you might look for a point where the decrease in residual variance slows down, suggesting diminishing returns from adding more topics.
  • Topic Modeling with Verified Components Four components are executed on different settings and modes. This should help with an overview of how these components can be adopted in different scenarios: - STM model or LDA model - scoring one or multiple models topics - visualizing default topic labels or automated/custom labels Note: make sure to open the views of the components in the blue annotations.
  • Scoring
  • Predictor
  • 04 Interactive Views
  • 05 Apply the models again on 'unseen' data
  • adapted from: Topic Modeling Space https://hub.knime.com/-/spaces/-/latest/~LHP4VTo-KWY99YYv/
  • 06 Train with additional Meta Data
  • 07 Interactive Views - assign Lables automatically and individually
  • prepare INSERT_HERE_PROPER_LABEL
  • add ModelID
  • join the automated and new labels
  • 90/10 split
  • ../model/r_model_topics.zip
  • ../model/r_model_topics_meta.zip
  • ../data/poliblogs2008.csv.gz
  • column("documents").replace(/[^a-zA-Z0-9 .,?!-_$€£%&@#]/g, "") remove special characters
  • remove text data and metadata already added to document column type
  • lower case
  • words with at least 3 characters
  • Terms representing numbers
  • Terms containing numbers
  • Non descriptive terms
  • exlclude words occuring less than 5 times
  • Document
  • rename colums with new labels
  • new column for assigned topic
  • new column for topic-term table
  • the optimal search is demanding. You might have to start with a smaller number of lines
  • manually assign Topic names
  • ../data/topic_preprocessing.table
  • meta_label_assigner.table
  • topic_preprocessing.table
  • ../model/meta_label_assigner.table
  • ../model/meta_topic_ models_terms_weight.table
  • ../model/meta_label_assigner_meta.table
  • ../model/meta_topic_models_ terms_meta_weight.table
  • always keep body text
  • additional metadata
  • doc col
  • py3_knime_topic_r
  • previously selected metadata fields
  • seed
  • per-document-per-topic (theta/gamma)
  • include selected metadata fields
  • doc column
  • Topic ID
  • Term
  • Weight
  • assign topic column
  • output of automatic topic names
  • Averaging distances
  • Distance 0 when same topics
  • DISTANCE MATRIX
  • roboto
  • topics
  • docs
  • tip
  • terms
  • Conf. Show/Hide Grid, Axes, etc.
  • Conf. Shared Y-Axis
  • Conf. x Axis Column
  • Conf. Categorical Column
  • Conf. y Axis Column
  • Conf. Max Number of Small Multiples
  • Conf. number of columns
  • Conf. Chart Type
  • Chart title
  • distance on word embeddings
  • distance on pairs
  • Select only words included in the topic model
  • extract word embedding for vocabulary
  • Distinct
  • number embeddings
  • window size
  • minimum count
  • sample size
  • number of top terms
  • doc preview size
  • + docs
  • + terms for each topic
  • Select Column
  • Number of Digits Settings
  • Decomposition of the matrix
  • color keywords
  • labels
  • docid
  • top x
  • Deep Learning Architecture
  • main
  • br
  • disable assigned topic
  • Similarity rank
  • Top similarity
  • Top= Same model
  • convert to double
  • Number of terms
  • model ID col
  • ass. topic col
  • All terms and docs
  • Max members per group
  • Unique pairs
  • Topic coherence
  • Pair score
  • Terms per topic
  • FREX (weight)
  • no assigned column
  • unique term-freq
  • Looped topic
  • only words of topic_n
  • N terms
  • neighbour distances
  • exclusivity
  • Learn the Word2Vect Model
  • find optimal K
  • enable optimal K search
  • py3_knime_topic_r KNIME and R https://medium.com/p/6494a2a498cc
  • upper_bound
  • lower_bound
  • size
  • sigma prior
  • held-out proportion
  • integer-input-maxwords
  • from spline name to R function
  • operator flowvariable is adopted here
  • no extra metadata is present?
  • spline flow variable is adopted here
  • spaces around the operator
  • k
  • number of terms per topic
  • optimal K max
  • optimal K stepping
  • remove rows for missing values
  • metadata
  • training
  • per-term-per-topic (beta)
  • score single K
  • export
  • replace spaces with "_"
  • remove symbols
  • language
  • initialization
  • gamma prior
  • kappa prior
  • formula operator
  • specify smooth terms
  • select metric
  • data preparation
  • Coherence
  • Residuals
  • held-out likelihood
  • space
  • k = 6

Nodes

Extensions

Links