MCPcopy Create free account

hub / github.com/Leavingseason/rnn_recsys / functions

Functions76 in github.com/Leavingseason/rnn_recsys

↓ 5 callersFunctionwrapper_autoencoder_data
(data, noise_ratio, sample_negative)
helper/data_loader.py:151
↓ 3 callersMethod_optimize
(self, loss , model_params )
models/DAE.py:113
↓ 2 callersMethod_get_activation_func
(self, name)
models/LinearAvgRS.py:68
↓ 2 callersMethod_get_loss
(self, preds, Y)
models/LinearAvgRS.py:43
↓ 2 callersMethod_init_graph
(self)
models/LinearAvgRS.py:83
↓ 2 callersFunctionclean_str
reuse the code from https://github.com/dennybritz/cnn-text-classification-tf/blob/master/data_helpers.py Tokenization/string cleaning for a
helper/utils.py:17
↓ 2 callersFunctionevaluate_RS
(my_model, data_loader_func, train_file, article_emb_file, batch_size)
train.py:71
↓ 2 callersMethodfit
(self, sp_indices, sp_noised_values, sp_original_values, sp_mask_indices, cur_batch_size)
models/DAE.py:125
↓ 2 callersMethodget_activation_func
(self, name)
models/DAE.py:160
↓ 2 callersFunctionload_article_embeddings
(infile)
helper/data_loader.py:189
↓ 2 callersMethodrestore_model
(self, filename)
models/DAE.py:180
↓ 2 callersFunctionsample_one_article
(mylist, d)
small_jobs.py:70
↓ 2 callersFunctionsample_one_neg_word
()
helper/data_loader.py:186
↓ 2 callersMethodsave_model
(self, filename, step)
models/DAE.py:175
↓ 2 callersFunctiontry_get_param
(hparams, key, dvalue)
helper/utils.py:10
↓ 2 callersFunctionwrapper_CDAE_data
(data, noise_ratio , sample_negative )
helper/data_loader.py:83
↓ 2 callersFunctionzero_padding
(user_history, max_len, dim)
helper/data_loader.py:257
↓ 1 callersMethod__init__
(self)
test.py:12
↓ 1 callersMethod__init__
(self, **hparam )
models/LinearAvgRS.py:11
↓ 1 callersMethod_build_model
(self)
models/LinearAvgRS.py:121
↓ 1 callersMethod_build_model
(self)
models/RNNRS.py:54
↓ 1 callersMethod_gather_last_output
(self, data, seq_lens)
models/RNNRS.py:49
↓ 1 callersMethod_get_a_cell
(self, size, func)
models/RNNRS.py:39
↓ 1 callersMethod_optimize
(self, loss , model_params )
models/LinearAvgRS.py:56
↓ 1 callersFunctionbuild_category_probability_and_inverted_index
(mylist)
small_jobs.py:81
↓ 1 callersMethodbuild_model
(self)
models/DAE.py:79
↓ 1 callersMethodclear
(self)
helper/word_hashing.py:18
↓ 1 callersMethoddo_hashing
(self, infile)
helper/word_hashing.py:24
↓ 1 callersMethodecho
(self)
test.py:15
↓ 1 callersMethodevaluate
(self, sp_indices, sp_noised_values, sp_original_values, sp_mask_indices, cur_batch_size )
models/DAE.py:150
↓ 1 callersMethodget_encoding
(self, sp_indices, sp_noised_values , cur_batch_size)
models/DAE.py:137
↓ 1 callersMethodget_predictions
(self, sp_indices, sp_noised_values, sp_original_values, sp_mask_indices, cur_batch_size)
models/DAE.py:143
↓ 1 callersFunctionload_article_category_as_list
(infile)
small_jobs.py:99
↓ 1 callersFunctionload_autoencoder
()
helper/demo.py:71
↓ 1 callersFunctionload_documents
r''' infile format: id \t category \t title returns: doc2title, doc2category
helper/data_loader.py:11
↓ 1 callersFunctionprint_top_words
()
helper/demo.py:29
↓ 1 callersMethodselect_top_words
(self, word2freq, k)
helper/word_hashing.py:69
↓ 1 callersFunctionsplit_list
(mylist)
small_jobs.py:76
↓ 1 callersFunctiontrain_RS
()
train.py:89
↓ 1 callersFunctionwrap_ae_data
(one_tfidf, noise_ratio = 0.2 , sample_negative = False)
helper/data_loader.py:119
Method__del__
( self )
models/DAE.py:74
Method__del__
( self )
models/LinearAvgRS.py:28
Method__init__
(self)
test.py:19
Method__init__
(self, topk = 100000)
helper/word_hashing.py:15
Method__init__
Constructor
models/CDAE.py:17
Method__init__
vocab_size, emb_size, enc_func, dec_func, is_tied_params, lambda_w, learning_rate, type_of_opt (adadelta)rho, (adam)beta1, beta2, e
models/DAE.py:16
Method__init__
params: dim : actually, the embedding size of document
models/LinearAvgRS.py:96
Method__init__
layer_sizes : number of hidden units in each layer. len(layer_sizes) indicates the number of layers. Make sure the size of the last layer
models/RNNRS.py:18
Methodbuild_model
(self)
models/CDAE.py:35
Functionconvert_doc_tfidf
(doc2title, wh_model)
helper/demo.py:20
Functionconvert_line_to_tfidf
(line, wh_model, norm = False)
helper/utils.py:47
Functionconvert_raw_file_to_indexed
r''' input format: id\t category\t title output format: id\t word:weight ...
small_jobs.py:113
Functiondump_obj_to_file
(filename, obj)
helper/utils.py:38
Methodecho
(self)
test.py:23
Functionencode_articles
(outfile, infile = r'Your_path\articles.txt', word_hashing_file = r
train.py:158
Methodevaluate
(self, X, Y, batch_size)
models/LinearAvgRS.py:167
Methodevaluate
(self, user_history, target_items, labels, user_history_lens, max_len, batch_size)
models/RNNRS.py:106
Methodfit
(self, sp_indices, sp_noised_values, sp_original_values, sp_mask_indices, sp_indices1, sp_noised
models/CDAE.py:93
Methodfit
(self, X, Y, batch_size)
models/LinearAvgRS.py:145
Methodfit
(self, user_history, target_items, labels, user_history_lens, max_len, batch_size)
models/RNNRS.py:80
Functiongen_word_hashing
(raw_file, outfile, topk )
small_jobs.py:16
Functionget_firstlines
(infile, outfile, k)
helper/utils.py:66
Functionload_CDAE_data
infile format: 0:0.2 3:0.6...\t...\t... which indicates that x0 x1 belong to the same category, while x2 does not. return
helper/data_loader.py:47
Functionload_article_content
(infile)
helper/data_loader.py:33
Functionload_autoencoder_data
returns a tuple: sp_indices: a matrix of [*, 2] * is determined by batch_size and number of words per line sp_noised_values:
helper/data_loader.py:93
Functionload_avgRS_data
returns : batch_X: a matrix of [batch_size, dim] batch_Y: [batch_size, 1]
helper/data_loader.py:263
Functionload_obj_from_file
(filename)
helper/utils.py:42
Functionload_rnnRS_data
returns a tuple: user_history: a tensor of [batch_size, time_steps, dim] target_items: a matrix of [batch_size, dim] labe
helper/data_loader.py:202
Functionload_wordhash_data
(filename)
small_jobs.py:21
Methodpred
return a numpy list
models/LinearAvgRS.py:156
Methodpred
return a numpy list
models/RNNRS.py:93
Functionprepare_autoencoder_files
(infile, outfile )
small_jobs.py:30
Functionprepare_triple_autoencoder_files
step 1 : from article_raw load a list of (article id, category) step 2 : shuffle the list step 3 : split the list into two disjoint l
small_jobs.py:40
Methodrestore_model
(self, filename)
models/LinearAvgRS.py:38
Methodsave_model
(self, filename, step)
models/LinearAvgRS.py:33
Functiontrain_autoencoder
()
train.py:20