Created
March 11, 2020 14:55
-
-
Save LouisdeBruijn/0de885fa43d4d36129fce2838cf2641b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def baseline_classifier(Xtest, Ytest): | |
| """Baseline by randomly assigning a label to each document.""" | |
| label_list = [label for label in set(Ytest)] # random.choice cannot index a set, so needs to be a list | |
| baseline = [random.choice(label_list) for sent in Xtest] | |
| return baseline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment