MCPcopy Create free account

hub / github.com/deezer/w2v_reco_hyperparameters_matter / functions

Functions56 in github.com/deezer/w2v_reco_hyperparameters_matter

↓ 3 callersMethodsave_word2vec_format
Deprecated. Use model.wv.save_word2vec_format instead.
word2vec.py:957
↓ 2 callersFunctionmean_confidence_interval
Standard t-test over mean.
src/main.py:29
↓ 2 callersMethodreset_weights
Reset all projection weights to an initial (untrained) state, but keep the existing vocabulary.
word2vec.py:1415
↓ 2 callersMethodseeded_vector
Create one 'random' vector (but deterministic by seed_string)
word2vec.py:1409
↓ 1 callersMethod_minimize_model
(self, save_syn1=False, save_syn1neg=False, save_vectors_lockf=False)
word2vec.py:939
↓ 1 callersMethodaccuracy
(self, questions, restrict_vocab=30000, most_similar=None, case_insensitive=True)
word2vec.py:901
↓ 1 callersMethodadd_null_word
(self, wv)
word2vec.py:1330
↓ 1 callersMethodclear_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 callersFunctioncold_start
(train, test, f)
src/data.py:9
↓ 1 callersMethodcreate_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 callersFunctionget_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 callersMethodinit_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 callersMethodload
Loads a previously saved `Word2Vec` model. Also see `save()`. Parameters ---------- fname : str Path to the saved
word2vec.py:962
↓ 1 callersMethodmake_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 callersFunctionrun
src/main.py:38
↓ 1 callersMethodsave
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 callersFunctionscore_cbow_pair
(model, word, l1)
word2vec.py:405
↓ 1 callersFunctionscore_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 callersFunctionscore_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 callersFunctionscore_sg_pair
(model, word, word2)
word2vec.py:397
↓ 1 callersMethodsort_vocab
Sort the vocabulary so the most frequent words have the lowest indexes.
word2vec.py:1183
↓ 1 callersFunctiontrain_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 callersFunctiontrain_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 callersFunctiontrain_cbow_pair
(model, word, input_word_indices, l1, alpha, learn_vectors=True, learn_hidden=True, comput
word2vec.py:328
↓ 1 callersFunctiontrain_sg_pair
(model, word, context_index, alpha, learn_vectors=True, learn_hidden=True, context_vectors=N
word2vec.py:252
↓ 1 callersMethodupdate_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
Methoddelete_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
Methodget_latest_training_loss
(self)
word2vec.py:933
Methodintersect_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
Methodload_word2vec_format
Deprecated. Use gensim.models.KeyedVectors.load_word2vec_format instead.
word2vec.py:951
Methodlog_accuracy
(section)
word2vec.py:897
Methodpredict_output_word
Report the probability distribution of the center word given the context words as input to the trained model. Parameters ----
word2vec.py:832
Methodprepare_vocab
Apply vocabulary settings for `min_count` (discarding less-frequent words) and `sample` (controlling the downsampling of more-frequent words).
word2vec.py:1191
Methodprepare_weights
Build tables and model weights based on final vocabulary settings.
word2vec.py:1401
Methodreset_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
Methodscan_vocab
Do an initial scan of all words appearing in sentences.
word2vec.py:1145
Methodscore
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
Methodtrain
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
Methodworker_loop
Compute log probability for each sentence, lifting lists of sentences from the jobs queue.
word2vec.py:671