Updated LDA training notebook
{
"cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "!git clone https://github.com/MIND-Lab/OCTIS\n",
+ "from pathlib import Path\n",
+ "Path(\"/content/20NewsGroup\").mkdir(parents=True, exist_ok=True)\n",
+ "!wget -P /content/20NewsGroup/ https://raw.githubusercontent.com/MIND-Lab/OCTIS/master/octis/preprocessed_datasets/20NewsGroup/corpus.txt\n",
+ "!wget -P /content/20NewsGroup/ https://raw.githubusercontent.com/MIND-Lab/OCTIS/master/octis/preprocessed_datasets/20NewsGroup/labels.txt\n",
+ "!wget -P /content/20NewsGroup/ https://raw.githubusercontent.com/MIND-Lab/OCTIS/master/octis/preprocessed_datasets/20NewsGroup/metadata.json\n",
+ "!wget -P /content/20NewsGroup/ https://raw.githubusercontent.com/MIND-Lab/OCTIS/master/octis/preprocessed_datasets/20NewsGroup/vocabulary.txt\n",
+ "import sys\n",
+ "sys.path.insert(0,'/content/OCTIS')"
+ ]
+ },
{
"cell_type": "code",
"execution_count": 20,
"outputs": [],
"source": [
"import os\n",
- "from octis.models.NMF import NMF\n",
+ "from octis.models.LDA import LDA\n",
"from octis.dataset.dataset import Dataset\n",
"from octis.evaluation_metrics.diversity_metrics import TopicDiversity\n",
"from octis.evaluation_metrics.topic_significance_metrics import KL_vacuous"
"outputs": [],
"source": [
"# Create Model\n",
- "model = NMF(num_topics=20, passes=3)"
+ "model = LDA(num_topics=20, alpha=5)"
]
},
{
