Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LehengTHU/Agent4Rec
/ functions
Functions
304 in github.com/LehengTHU/Agent4Rec
⨍
Functions
304
◇
Types & classes
42
↓ 1 callers
Function
parse_args
()
recommenders/get_train_sh.py:3
↓ 1 callers
Method
parse_init_property
(self, init_property)
simulation/avatar.py:37
↓ 1 callers
Method
parse_init_statistic
Parse the init statistic of the avatar
simulation/avatar.py:42
↓ 1 callers
Method
pause_to_reflect_satisfaction
Reflect on recent observations and generate 'insights'.
simulation/memory.py:232
↓ 1 callers
Function
polish_data
(idx, prompt, sys_prompt, loop, executor, model="gpt-3.5-turbo", temperature=0)
datasets/ml-1m/4_generate_persona.py:320
↓ 1 callers
Function
precision
(rank, ground_truth)
recommenders/evaluator/backend/python/metric.py:20
↓ 1 callers
Method
prepare_dir
(self)
simulation/base/abstract_arena.py:72
↓ 1 callers
Method
preperation_for_saving
(self, args, special_args)
recommenders/models/base/abstract_RS.py:137
↓ 1 callers
Function
prior_graph
(n)
scripts/causal.py:170
↓ 1 callers
Method
reaction_to_recommended_items
Summarize the feelings of the avatar for recommended item list.
simulation/avatar.py:237
↓ 1 callers
Method
recommend_top_k
(self)
recommenders/models/base/abstract_RS.py:206
↓ 1 callers
Method
reflect
Generate a high level understanding of previous memories
simulation/memory.py:290
↓ 1 callers
Method
reparameterize
(self, mu, logvar)
recommenders/models/MultVAE.py:122
↓ 1 callers
Method
response_to_question
(self, question, remember=False)
simulation/avatar.py:179
↓ 1 callers
Method
restore_best_checkpoint
Restore the best performance checkpoint
recommenders/models/base/abstract_RS.py:366
↓ 1 callers
Function
restore_checkpoint
If a checkpoint exists, restores the PyTorch model from the checkpoint. Returns the model and the current epoch.
recommenders/models/base/utils.py:57
↓ 1 callers
Method
restore_checkpoint
If a checkpoint exists, restores the PyTorch model from the checkpoint. Returns the model and the current epoch.
recommenders/models/base/abstract_RS.py:296
↓ 1 callers
Method
save_args
(self)
recommenders/models/base/abstract_RS.py:109
↓ 1 callers
Function
save_checkpoint
(model, epoch, checkpoint_dir, buffer, max_to_keep=10)
recommenders/models/base/utils.py:41
↓ 1 callers
Method
save_results
save the results of the simulation
simulation/base/abstract_arena.py:236
↓ 1 callers
Function
save_user_dict_to_txt
(user_dict, base_path, filename)
scripts/utils.py:44
↓ 1 callers
Method
set_optimizer
(self)
recommenders/models/base/abstract_RS.py:170
↓ 1 callers
Function
significance_test
(group_data)
scripts/utils.py:287
↓ 1 callers
Method
simulate_all_avatars
excute the simulation for all avatars
simulation/base/abstract_arena.py:224
↓ 1 callers
Method
simulate_one_avatar
excute the simulation for one avatar avatar_id: the id of the simulated avatar
simulation/arena.py:380
↓ 1 callers
Method
train_one_epoch
(self, epoch)
recommenders/models/base/abstract_RS.py:134
↓ 1 callers
Method
validate_all_avatars
validate the users
simulation/base/abstract_arena.py:218
↓ 1 callers
Function
visualize_and_save_log
(file_dir, dataset_name, show=False)
recommenders/models/base/utils.py:274
↓ 1 callers
Method
warning
(self, message)
recommenders/util/logger.py:60
Function
Item_pop
(args, data, model)
recommenders/models/base/utils.py:181
Method
ThreadPool
the constructor just launches some amount of workers
recommenders/util/cython/include/thread_pool.h:38
Method
__contains__
(self, o)
recommenders/util/configurator.py:148
Method
__getattr__
(self, item)
recommenders/util/configurator.py:145
Method
__getitem__
(self, index)
recommenders/data.py:358
Method
__getitem__
(self, idx)
recommenders/util/data_iterator.py:129
Method
__getitem__
(self, item)
recommenders/util/configurator.py:117
Method
__init__
(self, args)
recommenders/data.py:73
Method
__init__
(self, modeltype, users, train_user_list, user_pop_idx, item_pop_idx, neg_sample, \ n_observat
recommenders/data.py:343
Method
__init__
(self)
recommenders/evaluator/abstract_evaluator.py:10
Method
__init__
Initializes a new `GroupedEvaluator` instance. Args: user_train_dict (dict): Each key is user ID and the corresponding
recommenders/evaluator/grouped_evaluator.py:24
Method
__init__
Initializes a new `ProxyEvaluator` instance. Args: user_train_dict (dict): Each key is user ID and the corresponding
recommenders/evaluator/proxy_evaluator.py:41
Method
__init__
Initializes a new `UniEvaluator` instance. Args: user_train_dict (dict): Each key is user ID and the corresponding
recommenders/evaluator/backend/python/uni_evaluator.py:33
Method
__init__
Initializes a new `UniEvaluator` instance. Args: user_train_dict (dict): Each key is user ID and the corresponding
recommenders/evaluator/backend/cpp/uni_evaluator.py:39
Method
__init__
(self, args, special_args)
recommenders/models/MF.py:12
Method
__init__
(self, args, special_args)
recommenders/models/LightGCN.py:12
Method
__init__
(self, args, special_args)
recommenders/models/Pop.py:15
Method
__init__
(self, args)
recommenders/models/Pop.py:43
Method
__init__
(self, args, special_args)
recommenders/models/Random.py:13
Method
__init__
(self, args, special_args)
recommenders/models/MultVAE.py:25
Method
__init__
(self, args)
recommenders/models/MultVAE.py:73
Method
__init__
(self, args, special_args)
recommenders/models/InfoNCE.py:12
Method
__init__
(self, args, data)
recommenders/models/InfoNCE.py:83
Method
__init__
(self, args, special_args)
recommenders/models/base/abstract_RS.py:17
Method
__init__
(self, args, data)
recommenders/models/base/abstract_model.py:16
Method
__init__
Initializes a new `SequentialSampler` instance. Args: data_source (_Dataset): Dataset to sample from.
recommenders/util/data_iterator.py:29
Method
__init__
Initializes a new `SequentialSampler` instance. Args: data_source (_Dataset): Dataset to sample from.
recommenders/util/data_iterator.py:49
Method
__init__
Initializes a new `BatchSampler` instance. Args: sampler (Sampler): Base sampler. batch_size (int): Size of mini-batc
recommenders/util/data_iterator.py:70
Method
__init__
(self, data)
recommenders/util/data_iterator.py:119
Method
__init__
(self, loader)
recommenders/util/data_iterator.py:137
Method
__init__
Args: *data: Variable length data list. batch_size (int): How many samples per batch to load. Defaults to `1`.
recommenders/util/data_iterator.py:178
Method
__init__
Initializes a new `Logger` instance. Args: filename (str): File name to create. The directory component of this f
recommenders/util/logger.py:18
Method
__init__
Initializes a new `Configurator` instance. Args: config_file (str): The path of ini-style configuration file. default
recommenders/util/configurator.py:44
Method
__init__
(self, args)
simulation/arena.py:18
Method
__init__
(self, args, avatar_id, init_property, init_statistic)
simulation/avatar.py:27
Method
__init__
(self, args)
simulation/base/abstract_memory.py:2
Method
__init__
(self, args)
simulation/base/abstract_arena.py:19
Method
__init__
(self, args, avatar_id)
simulation/base/abstract_avatar.py:17
Method
__iter__
(self)
recommenders/util/data_iterator.py:18
Method
__iter__
(self)
recommenders/util/data_iterator.py:38
Method
__iter__
(self)
recommenders/util/data_iterator.py:58
Method
__iter__
(self)
recommenders/util/data_iterator.py:95
Method
__iter__
(self)
recommenders/util/data_iterator.py:154
Method
__iter__
(self)
recommenders/util/data_iterator.py:206
Method
__len__
(self)
recommenders/data.py:392
Method
__len__
(self)
recommenders/util/data_iterator.py:21
Method
__len__
(self)
recommenders/util/data_iterator.py:41
Method
__len__
(self)
recommenders/util/data_iterator.py:62
Method
__len__
(self)
recommenders/util/data_iterator.py:105
Method
__len__
(self)
recommenders/util/data_iterator.py:126
Method
__len__
(self)
recommenders/util/data_iterator.py:142
Method
__len__
(self)
recommenders/util/data_iterator.py:209
Method
__next__
(self)
recommenders/util/data_iterator.py:145
Method
__repr__
(self)
recommenders/util/configurator.py:157
Method
_eval_one_user
(idx)
recommenders/evaluator/backend/python/uni_evaluator.py:156
Method
_get_combined_score
Return the combined score for a document.
simulation/retriever.py:47
Method
_get_memories_until_limit
Reduce the number of tokens in the documents.
simulation/memory.py:97
Function
_get_pairwise_all_likefism_data
(dataset)
recommenders/util/data_generator.py:5
Function
_get_pairwise_all_likefossil_data
(dataset, high_order, train_dict)
recommenders/util/data_generator.py:54
Function
_get_pointwise_all_likefism_data
(dataset, num_negatives, train_dict)
recommenders/util/data_generator.py:29
Function
_get_pointwise_all_likefossil_data
(dataset, high_order, num_negatives, train_dict)
recommenders/util/data_generator.py:80
Method
_parse_list
Parse a newline-separated string into a list of strings.
simulation/memory.py:70
Method
_reaction
Summarize the feelings of the avatar for recommended item list.
simulation/base/abstract_avatar.py:24
Method
aadd_documents
Add documents to vectorstore.
simulation/retriever.py:167
Function
activity
(x)
datasets/ml-1m/2_get_user_statistic.py:36
Method
add_memory
Add one new memory to the memory bank
simulation/base/abstract_memory.py:7
Method
add_special_model_attr
(self, args)
recommenders/models/Pop.py:46
Method
add_special_model_attr
(self, args)
recommenders/models/MultVAE.py:76
Method
aget_relevant_documents
Return documents that are relevant to the query.
simulation/retriever.py:147
Function
agg_func
(x)
datasets/ml-1m/1_get_cf_data.py:180
Function
align_loss
(x, y, alpha=2)
recommenders/models/base/utils.py:268
← previous
next →
101–200 of 304, ranked by callers