Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deezer/w2v_reco_hyperparameters_matter
/ functions
Functions
56 in github.com/deezer/w2v_reco_hyperparameters_matter
⨍
Functions
56
◇
Types & classes
7
↳
Endpoints
1
↓ 3 callers
Method
save_word2vec_format
Deprecated. Use model.wv.save_word2vec_format instead.
word2vec.py:957
↓ 2 callers
Function
mean_confidence_interval
Standard t-test over mean.
src/main.py:29
↓ 2 callers
Method
reset_weights
Reset all projection weights to an initial (untrained) state, but keep the existing vocabulary.
word2vec.py:1415
↓ 2 callers
Method
seeded_vector
Create one 'random' vector (but deterministic by seed_string)
word2vec.py:1409
↓ 1 callers
Method
_minimize_model
(self, save_syn1=False, save_syn1neg=False, save_vectors_lockf=False)
word2vec.py:939
↓ 1 callers
Method
accuracy
(self, questions, restrict_vocab=30000, most_similar=None, case_insensitive=True)
word2vec.py:901
↓ 1 callers
Method
add_null_word
(self, wv)
word2vec.py:1330
↓ 1 callers
Method
clear_sims
Removes all L2-normalized vectors for words from the model. You will have to recompute them using init_sims method.
word2vec.py:752
↓ 1 callers
Function
cold_start
(train, test, f)
src/data.py:9
↓ 1 callers
Method
create_binary_tree
Create a binary Huffman tree using stored vocabulary word counts. Frequent words will have shorter binary codes. Called internally from `build
word2vec.py:1336
↓ 1 callers
Function
get_data
Split the raw sessions into training sessions for p2v and mp2v and a common test set. path_data: str Path to .npy file with shap
src/data.py:24
↓ 1 callers
Method
init_sims
init_sims() resides in KeyedVectors because it deals with syn0/vectors mainly, but because syn1 is not an attribute of KeyedVectors,
word2vec.py:876
↓ 1 callers
Method
load
Loads a previously saved `Word2Vec` model. Also see `save()`. Parameters ---------- fname : str Path to the saved
word2vec.py:962
↓ 1 callers
Method
make_cum_table
Create a cumulative-distribution table using stored vocabulary word counts for drawing random words in the negative-sampling training routines
word2vec.py:1369
↓ 1 callers
Function
run
src/main.py:38
↓ 1 callers
Method
save
Save the model. This saved model can be loaded again using :func:`~gensim.models.word2vec.Word2Vec.load`, which supports online training and g
word2vec.py:919
↓ 1 callers
Function
score_cbow_pair
(model, word, l1)
word2vec.py:405
↓ 1 callers
Function
score_sentence_cbow
Obtain likelihood score for a single sentence in a fitted CBOW representaion. The sentence is a list of Vocab objects (or None, where
word2vec.py:224
↓ 1 callers
Function
score_sentence_sg
Obtain likelihood score for a single sentence in a fitted skip-gram representaion. The sentence is a list of Vocab objects (or None,
word2vec.py:198
↓ 1 callers
Function
score_sg_pair
(model, word, word2)
word2vec.py:397
↓ 1 callers
Method
sort_vocab
Sort the vocabulary so the most frequent words have the lowest indexes.
word2vec.py:1183
↓ 1 callers
Function
train_batch_cbow
Update CBOW model by training on a sequence of sentences. Each sentence is a list of string tokens, which are looked up in the model'
word2vec.py:174
↓ 1 callers
Function
train_batch_sg
Update skip-gram model by training on a sequence of sentences. Each sentence is a list of string tokens, which are looked up in the m
word2vec.py:147
↓ 1 callers
Function
train_cbow_pair
(model, word, input_word_indices, l1, alpha, learn_vectors=True, learn_hidden=True, comput
word2vec.py:328
↓ 1 callers
Function
train_sg_pair
(model, word, context_index, alpha, learn_vectors=True, learn_hidden=True, context_vectors=N
word2vec.py:252
↓ 1 callers
Method
update_weights
Copy all the existing weights, and reset the weights for the newly added vocabulary.
word2vec.py:1431
Method
__contains__
Deprecated. Use self.wv.__contains__() instead. Refer to the documentation for `gensim.models.keyedvectors.Word2VecKeyedVectors.__con
word2vec.py:825
Method
__getitem__
Deprecated. Use self.wv.__getitem__() instead. Refer to the documentation for `gensim.models.keyedvectors.Word2VecKeyedVectors.__geti
word2vec.py:817
Method
__init__
Initialize the model from an iterable of `sentences`. Each sentence is a list of words (unicode strings) that will be used for traini
word2vec.py:425
Method
__init__
(self, dirname)
word2vec.py:986
Method
__init__
(self, fname, max_sentence_length=MAX_WORDS_IN_BATCH)
word2vec.py:1009
Method
__init__
`source` can be either a string or a file object. Clip the file to the first `limit` lines (or not clipped if limit is None, the defa
word2vec.py:1039
Method
__init__
`source` should be a path to a directory (as a string) where all files can be opened by the LineSentence class. Each file will be rea
word2vec.py:1091
Method
__init__
(self, max_vocab_size=None, min_count=5, sample=1e-3, sorted_vocab=True, null_word=0, power_alpha=0.75)
word2vec.py:1135
Method
__init__
(self, vector_size=100, seed=1, hashfxn=hash)
word2vec.py:1396
Method
__iter__
(self)
word2vec.py:989
Method
__iter__
(self)
word2vec.py:1013
Method
__iter__
Iterate through the lines in the source.
word2vec.py:1058
Method
__iter__
iterate through the files
word2vec.py:1121
Method
__str__
(self)
word2vec.py:905
Method
_clear_post_train
Resets certain properties of the model, post training.
word2vec.py:543
Method
_do_train_job
Train a single batch of sentences. Return 2-tuple `(effective word count after ignoring unknown words and sentence length trimming, t
word2vec.py:530
Method
_set_train_params
(self, **kwargs)
word2vec.py:547
Method
delete_temporary_training_data
Discard parameters that are used in training and score. Use if you're sure you're done training a model. If `replace_word_vectors_with_normali
word2vec.py:910
Method
get_latest_training_loss
(self)
word2vec.py:933
Method
intersect_word2vec_format
Merge the input-hidden weight matrix from the original C word2vec-tool format given, where it intersects with the current vocabulary. (No word
word2vec.py:759
Method
load_word2vec_format
Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.
word2vec.py:951
Method
log_accuracy
(section)
word2vec.py:897
Method
predict_output_word
Report the probability distribution of the center word given the context words as input to the trained model. Parameters ----
word2vec.py:832
Method
prepare_vocab
Apply vocabulary settings for `min_count` (discarding less-frequent words) and `sample` (controlling the downsampling of more-frequent words).
word2vec.py:1191
Method
prepare_weights
Build tables and model weights based on final vocabulary settings.
word2vec.py:1401
Method
reset_from
Borrow shareable pre-built structures (like vocab) from the other_model. Useful if testing multiple models in parallel on the same corpus.
word2vec.py:886
Method
scan_vocab
Do an initial scan of all words appearing in sentences.
word2vec.py:1145
Method
score
Score the log probability for a sequence of sentences (can be a once-only generator stream). Each sentence must be a list of unicode strings.
word2vec.py:614
Method
train
Update the model's neural weights from a sequence of sentences (can be a once-only generator stream). For Word2Vec, each sentence must be a li
word2vec.py:552
Method
worker_loop
Compute log probability for each sentence, lifting lists of sentences from the jobs queue.
word2vec.py:671