Skip to content

Commit

Permalink
Remove probabilistic in crowdsourcing tutorial (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
brahmaneya authored Oct 29, 2019
1 parent 157fe33 commit 1079507
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 65 deletions.
114 changes: 53 additions & 61 deletions crowdsourcing/crowdsourcing_tutorial.ipynb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions crowdsourcing/crowdsourcing_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def polarity_negative_2(x):
# at inference time.**
# In order to run inference on new incoming data points, we need to train a
# discriminative model over the tweets themselves.
# Let's generate a set of probabilistic labels for that training set.
# Let's generate a set of labels for that training set.

# %%
preds_train = label_model.predict(L_train)
Expand Down Expand Up @@ -261,7 +261,7 @@ def encode_text(text):
X_test = np.array(list(df_test.tweet_text.apply(encode_text).values))

# %% [markdown]
# ### Model on probabilistic labels
# ### Model on labels
# Now, we train a simple logistic regression model on the BERT features, using labels
# obtained from our LabelModel.

Expand All @@ -283,4 +283,4 @@ def encode_text(text):
# In this tutorial, we accomplished the following:
# * We demonstrated how to combine crowdsourced labels with other programmatic LFs to improve coverage.
# * We used the `LabelModel` to combine inputs from crowdworkers and other LFs to generate high quality probabilistic labels.
# * We used our probabilistic labels to train a classifier for making predictions on new, unseen data points.
# * We used our labels to train a classifier for making predictions on new, unseen data points.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#### ESSENTIAL LIBRARIES

snorkel==0.9.0
snorkel==0.9.2


#### DEV TOOLS
Expand Down

0 comments on commit 1079507

Please sign in to comment.