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
{"directed": true, "multigraph": false, "graph": {}, "nodes": [{"ppr_percentile": 39.937106918239, "weighted_degree": 6.0, "generic_tag": "method", "born_time": "b1", "id": "maximum_likelihood"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "context-aware"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "interactive_machine_translation"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "method", "born_time": "b5", "id": "neural_encoder-decoder"}, {"ppr_percentile": 36.477987421383645, "weighted_degree": 5.0, "generic_tag": "pheno", "born_time": "b0", "id": "lexicalized_tree-adjoining"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "urdu"}, {"ppr_percentile": 44.077568134171905, "weighted_degree": 6.0, "generic_tag": "method", "born_time": "b0", "id": "class_based"}, {"ppr_percentile": 76.10062893081759, "weighted_degree": 28.0, "generic_tag": |
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
{"directed": true, "multigraph": false, "graph": {}, "nodes": [{"ppr_percentile": 52.43393602225313, "weighted_degree": 8.0, "generic_tag": "method", "born_time": "b1", "id": "maximum_likelihood"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "context-aware"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "interactive_machine_translation"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "method", "born_time": "b5", "id": "neural_encoder-decoder"}, {"ppr_percentile": 36.578581363004176, "weighted_degree": 4.0, "generic_tag": "pheno", "born_time": "b0", "id": "lexicalized_tree-adjoining"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "urdu"}, {"ppr_percentile": 22.670375521557716, "weighted_degree": 2.0, "generic_tag": "method", "born_time": "b0", "id": "class_based"}, {"ppr_percentile": 60.22253129346314, "weighted_degree": 7.0, "generic_tag" |
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
{"directed": true, "multigraph": false, "graph": {}, "nodes": [{"ppr_percentile": 14.634146341463413, "weighted_degree": 1.0, "generic_tag": "method", "born_time": "b1", "id": "maximum_likelihood"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "context-aware"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "interactive_machine_translation"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "method", "born_time": "b5", "id": "neural_encoder-decoder"}, {"ppr_percentile": 41.707317073170735, "weighted_degree": 5.0, "generic_tag": "pheno", "born_time": "b0", "id": "lexicalized_tree-adjoining"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "urdu"}, {"ppr_percentile": 23.04878048780488, "weighted_degree": 2.0, "generic_tag": "method", "born_time": "b0", "id": "class_based"}, {"ppr_percentile": 8.78048780487805, "weighted_degree": 1.0, "generic_tag": |
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
{"directed": true, "multigraph": false, "graph": {}, "nodes": [{"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "method", "born_time": "b1", "id": "maximum_likelihood"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "context-aware"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "interactive_machine_translation"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "method", "born_time": "b5", "id": "neural_encoder-decoder"}, {"ppr_percentile": 26.848249027237355, "weighted_degree": 2.0, "generic_tag": "pheno", "born_time": "b0", "id": "lexicalized_tree-adjoining"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "pheno", "born_time": "b4", "id": "urdu"}, {"ppr_percentile": 37.7431906614786, "weighted_degree": 2.0, "generic_tag": "method", "born_time": "b0", "id": "class_based"}, {"ppr_percentile": 0.0, "weighted_degree": 0.0, "generic_tag": "method", "born_time": "b1", |
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
{"directed": false, "multigraph": false, "graph": {"name": "Zachary's Karate Club"}, "nodes": [{"club": "Mr. Hi", "id": 0}, {"club": "Mr. Hi", "id": 1}, {"club": "Mr. Hi", "id": 2}, {"club": "Mr. Hi", "id": 3}, {"club": "Mr. Hi", "id": 4}, {"club": "Mr. Hi", "id": 5}, {"club": "Mr. Hi", "id": 6}, {"club": "Mr. Hi", "id": 7}, {"club": "Mr. Hi", "id": 8}, {"club": "Officer", "id": 9}, {"club": "Mr. Hi", "id": 10}, {"club": "Mr. Hi", "id": 11}, {"club": "Mr. Hi", "id": 12}, {"club": "Mr. Hi", "id": 13}, {"club": "Officer", "id": 14}, {"club": "Officer", "id": 15}, {"club": "Mr. Hi", "id": 16}, {"club": "Mr. Hi", "id": 17}, {"club": "Officer", "id": 18}, {"club": "Mr. Hi", "id": 19}, {"club": "Officer", "id": 20}, {"club": "Mr. Hi", "id": 21}, {"club": "Officer", "id": 22}, {"club": "Officer", "id": 23}, {"club": "Officer", "id": 24}, {"club": "Officer", "id": 25}, {"club": "Officer", "id": 26}, {"club": "Officer", "id": 27}, {"club": "Officer", "id": 28}, {"club": "Officer", "id": 29}, {"club": "Officer", "id": |
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
import pandas as pd | |
import scipy.sparse as sps | |
df = pd.DataFrame({'tag1': ['sean', 'udi', 'bogdan'], 'tag2': ['sean', 'udi', 'udi'], 'freq': [1,2,3]}) | |
# tag1 -> rows, tag2 -> columns | |
df.set_index(['tag1', 'tag2'], inplace=True) | |
mat = sps.coo_matrix((df.freq, (df.index.labels[0], df.index.labels[1]))) | |
print(mat.todense()) |
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
from itertools import izip | |
import numpy as np | |
import scipy as sp | |
import math | |
def get_base(unit ='bit'): | |
if unit == 'bit': | |
log = sp.log2 | |
elif unit == 'nat': | |
log = sp.log |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 better_table(table, caption, name): | |
start = r""" | |
\begin{{table}}[!htb] | |
\sisetup{{round-mode=places, round-precision=2}} | |
\caption{{{}}}\label{{table:{}}} | |
\centering | |
""".format(caption, name) | |
end = r"\end{table}" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.