Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/babylonhealth/corrsim
/ functions
Functions
62 in github.com/babylonhealth/corrsim
⨍
Functions
62
◇
Types & classes
8
↓ 5 callers
Function
get_similarity_by_name
(sim_name)
similarity/__init__.py:45
↓ 5 callers
Method
loadFile
(self, fpath)
senteval/sts.py:34
↓ 4 callers
Method
eval
(self, name)
senteval/engine.py:45
↓ 4 callers
Function
ksg_factory
:param k: number of nearest neighbours :param pool: optional pooling function (e.g. np.mean or np.max) :return: KSG similarity with given
similarity/mi.py:20
↓ 3 callers
Method
compute_conf_intervals
(params)
senteval/sts.py:173
↓ 3 callers
Function
hsic
Computes Hilbert-Schmidt independence criterion (HSIC) between word embedding matrices X and Y :param X: word embedding matri
similarity/cka.py:61
↓ 2 callers
Function
_apsynp
APSynP similarity measure (Santus et al., 2018) applied to sentences represented as averaged word vectors :param x: list of word embeddin
similarity/correlation.py:59
↓ 2 callers
Function
batcher
(params, batch)
evaluation/corrset_eval.py:50
↓ 2 callers
Function
cka_factory
Builds a Centered Kernel Alignment (CKA) similarity function with the specified kernel :param kernel: kernel function for CKA :return
similarity/cka.py:54
↓ 1 callers
Function
apply_sim
(sim_func, vex, row)
evaluation/wordsim_eval.py:106
↓ 1 callers
Function
calculate_shapiro
(corrs, df, vex, exclude=())
evaluation/wordsim_eval.py:130
↓ 1 callers
Function
calculate_similarities
(df, vex, sims, exclude=())
evaluation/wordsim_eval.py:118
↓ 1 callers
Function
centering_matrix
Returns a centering matrix of dimension d :param d: dimension of the matrix :return: centering matrix of dimension d
similarity/cka.py:45
↓ 1 callers
Function
compute_ci
(scores, exclude=())
evaluation/wordsim_eval.py:144
↓ 1 callers
Function
correlation
(df, sims, exclude=())
evaluation/wordsim_eval.py:160
↓ 1 callers
Function
cosine
(x, y)
similarity/baseline.py:19
↓ 1 callers
Function
cosine
(u, v)
senteval/utils.py:46
↓ 1 callers
Method
do_prepare
(self, params, prepare)
senteval/sts.py:59
↓ 1 callers
Function
get_winner
(corrs, scores)
evaluation/wordsim_eval.py:221
↓ 1 callers
Function
get_wordvec
(path_to_vec, word2id)
evaluation/wordsim_eval.py:74
↓ 1 callers
Function
linear_kernel
Computes a linear kernel for X :param X: word embedding matrix X with shape (k x D) :return: linear kernel for X
similarity/cka.py:20
↓ 1 callers
Function
load_dataset
(data_dir)
evaluation/wordsim_eval.py:94
↓ 1 callers
Function
load_file
(fp)
evaluation/wordsim_eval.py:88
↓ 1 callers
Function
max_idxs
(lst)
evaluation/wordsim_eval.py:190
↓ 1 callers
Function
prepare
(params, samples)
evaluation/corrset_eval.py:40
↓ 1 callers
Function
print_frac_normal
(word_vectors)
evaluation/utils.py:94
↓ 1 callers
Method
run
(self, params, batcher)
senteval/sts.py:74
↓ 1 callers
Function
to_ci_table
(corrs, scores, sims, exclude=())
evaluation/wordsim_eval.py:268
↓ 1 callers
Function
to_table
(corrs, sims, exclude=())
evaluation/wordsim_eval.py:237
↓ 1 callers
Function
vector_correlations
(df, word_set, vex_fp, sims, exclude=())
evaluation/wordsim_eval.py:181
Method
__init__
(self, taskpath, seed=1111)
senteval/sts.py:178
Method
__init__
(self, taskpath, seed=1111)
senteval/sts.py:188
Method
__init__
(self, taskpath, seed=1111)
senteval/sts.py:196
Method
__init__
(self, taskpath, seed=1111)
senteval/sts.py:205
Method
__init__
(self, taskpath, seed=1111)
senteval/sts.py:214
Method
__init__
(self, params, batcher, prepare=None)
senteval/engine.py:31
Function
apsyn
(x, y)
similarity/correlation.py:79
Function
apsynp
(x, y)
similarity/correlation.py:83
Function
apsynp
(u, v)
evaluation/wordsim_eval.py:49
Function
avg_cosine
Cosine similarity between two avg. word vectors. :param x: list of word embeddings for the first sentence :param y: list of word embeddin
similarity/baseline.py:23
Function
batcher
(params, batch)
evaluation/infosim_eval.py:50
Function
batcher
(params, batch)
evaluation/conf_intervals.py:50
Function
batcher
(params, batch)
evaluation/corrsim_eval.py:50
Function
cka
Computes Centered Kernel Alignment (CKA) between word embedding matrices X and Y :param X: word embedding matrix X with shape
similarity/cka.py:76
Function
cosine
(u, v)
evaluation/wordsim_eval.py:58
Function
create_dictionary
(sentences, threshold=0)
evaluation/utils.py:40
Function
create_dictionary
(sentences)
senteval/utils.py:24
Function
dcorr
Computes Distance Correlation (dCorr) between word embedding matrices X and Y :param x: X: word embedding matrix X with shape (k x D)
similarity/cka.py:89
Function
gaussian_kernel
Computes a Gaussian kernel for X :param X: word embedding matrix X with shape (k x D) :param sigma: standard deviation of the kernel
similarity/cka.py:29
Function
get_word_vec_path_by_name
(word_vec_name)
evaluation/utils.py:34
Function
get_wordvec
Loads words and word vectors from a text file :param path_to_vec: path to word vector file in word2vec format :param word2id: words to lo
evaluation/utils.py:67
Function
kendall
Kendall correlation coefficient between two sentences represented as averaged word vectors :param x: list of word embeddings for the firs
similarity/correlation.py:46
Function
ksg
Kraskov–Stogbauer–Grassberger (KSG) estimator of mutual information between two sentences represented as word embedding matrices x an
similarity/mi.py:27
Function
max_ci_idxs
(corrs, scores)
evaluation/wordsim_eval.py:202
Function
max_spearman
Spearman correlation coefficient between two sentences represented as max-pooled word vectors :param x: list of word embeddings for the f
similarity/correlation.py:87
Function
pearson
Pearson correlation coefficient between two sentences represented as averaged word vectors :param x: list of word embeddings for the firs
similarity/correlation.py:20
Function
prepare
(params, samples)
evaluation/infosim_eval.py:40
Function
prepare
(params, samples)
evaluation/conf_intervals.py:40
Function
prepare
(params, samples)
evaluation/corrsim_eval.py:40
Function
spearman
Spearman correlation coefficient between two sentences represented as averaged word vectors :param x: list of word embeddings for the fir
similarity/correlation.py:33
Function
statistic
(data)
evaluation/wordsim_eval.py:40
Method
statistic
(data)
senteval/sts.py:124