Skip to content

Commit bec9309

Browse files
README updates and small fix in recipes
1 parent 0105191 commit bec9309

14 files changed

+37
-9
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,19 @@ perplexity_criterion = 'PerplexityScore@lemmatized -> min COLLECT 1'
246246
best_model = experiment.select(perplexity_criterion)
247247
```
248248

249+
### Alternatively: Use Recipes
250+
If you need a topic model now, you can use one ofthe code snippets we call recipes.
251+
```python
252+
from topicnet.cooking_machine.recipes import BaselineRecipe
253+
training_pipeline = BaselineRecipe()
254+
EXPERIMENT_PATH = '/home/user/experiment/'
255+
256+
training_pipeline.format_recipe(dataset_path=DATASET_PATH)
257+
experiment, dataset = training_pipeline.build_experiment_environment(save_path=EXPERIMENT_PATH,)
258+
```
259+
after that you can expect a following result:
260+
![run_result](./docs/readme_images/experiment_train.gif)
261+
249262
### View the results
250263

251264
Browsing the model is easy: create a viewer and call its `view()` method (or `view_from_jupyter()` — it is advised to use it if working in Jupyter Notebook):
416 KB
Loading

topicnet/cooking_machine/recipes/multimodal_exploratory_search_pipeline.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ def format_recipe(
153153
background_topics=background_topics,
154154
modality_list=modality_list,
155155
num_iter=num_iter,
156-
order=self._order
157156
)
158157
return self._recipe
159158

@@ -256,8 +255,7 @@ def _make_multimodal_recipe(
256255
reg_forms = self._form_regularizers(modality_list)
257256
cube_forms = self._form_and_order_cubes(
258257
modality_list,
259-
num_iter=num_iter,
260-
order=self._order)
258+
num_iter=num_iter,)
261259
self._recipe = self.recipe_template.format(
262260
modality=modality,
263261
dataset_path=dataset_path,

topicnet/demos/RTL-Wiki-Building-Topic-Model.ipynb renamed to topicnet/demos/2-RTL-Wiki-Building-Topic-Model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2787,7 +2787,7 @@
27872787
"name": "python",
27882788
"nbconvert_exporter": "python",
27892789
"pygments_lexer": "ipython3",
2790-
"version": "3.6.8"
2790+
"version": "3.6.9"
27912791
}
27922792
},
27932793
"nbformat": 4,

topicnet/demos/20NG-Preprocessing.ipynb renamed to topicnet/demos/4-20NG-Preprocessing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@
691691
"name": "python",
692692
"nbconvert_exporter": "python",
693693
"pygments_lexer": "ipython3",
694-
"version": "3.6.8"
694+
"version": "3.6.9"
695695
}
696696
},
697697
"nbformat": 4,

topicnet/demos/PScience-Building-Topic-Model.ipynb renamed to topicnet/demos/6-Postnauka-Building-Topic-Model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4394,7 +4394,7 @@
43944394
"name": "python",
43954395
"nbconvert_exporter": "python",
43964396
"pygments_lexer": "ipython3",
4397-
"version": "3.6.8"
4397+
"version": "3.6.9"
43984398
}
43994399
},
44004400
"nbformat": 4,

0 commit comments

Comments
 (0)