-
-
Save funktor/53b971da8dce1cce6023065218a08ff0 to your computer and use it in GitHub Desktop.
This file contains 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 print_state_features(state_features): | |
for (attr, label), weight in state_features: | |
print("%0.6f %-6s %s" % (weight, label, attr)) | |
print("Top positive:") | |
print_state_features(Counter(info.state_features).most_common(50)) | |
print("\nTop negative:") | |
print_state_features(Counter(info.state_features).most_common()[-50:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment