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
Function
ap
recommenders/evaluator/backend/cpp/include/metric.h:46
Function
arg_top_k_1d
recommenders/util/cython/include/arg_topk.h:15
Function
arg_top_k_2d
recommenders/util/cython/include/arg_topk.h:29
Function
bar_group_mean
(n_groups, groups)
scripts/utils.py:84
Function
bar_rating
(x, y, y_label)
scripts/utils.py:110
Function
batch_randint_choice
Return random integers from `0` (inclusive) to `high` (exclusive). :param high: integer :param size: 1-D array_like :param replace: bool
recommenders/util/tool.py:143
Function
checktensor
(tensor)
recommenders/models/base/utils.py:216
Function
choice_one
(idx)
recommenders/util/tool.py:160
Method
clear
Clear memory contents.
simulation/memory.py:61
Function
conformity
(x)
datasets/ml-1m/2_get_user_statistic.py:177
Function
count_genres
(x)
datasets/ml-1m/2_get_user_statistic.py:93
Function
cpp_evaluate_matrix
recommenders/evaluator/backend/cpp/include/evaluate.h:45
Function
csr_to_user_dict_bytime
(time_matrix,train_matrix)
recommenders/util/tool.py:78
Function
decorate
(func)
recommenders/util/tool.py:173
Function
diversity
(x)
datasets/ml-1m/2_get_user_statistic.py:127
Method
ensureDir
(dir_path)
simulation/base/abstract_arena.py:74
Function
eval_one_user
recommenders/evaluator/backend/cpp/include/evaluate.h:23
Method
evaluate
Evaluate `model`. Args: model: The model need to be evaluated. This model must have a method `predict_for_eval(se
recommenders/evaluator/abstract_evaluator.py:22
Method
evaluate
Evaluate `model` in user groups. Args: model: The model need to be evaluated. This model must have a method `pred
recommenders/evaluator/grouped_evaluator.py:91
Method
evaluate
Evaluate `model`. Args: model: The model need to be evaluated. This model must have a method `predict_for_eval(se
recommenders/evaluator/backend/python/uni_evaluator.py:98
Method
evaluate
Evaluate `model`. Args: model: The model need to be evaluated. This model must have a method `predict_for_eval(se
recommenders/evaluator/backend/cpp/uni_evaluator.py:110
Function
fix_seeds
(seed=101)
simulation/utils.py:11
Method
forward
(self, users, pos_items, neg_items)
recommenders/models/MF.py:47
Method
forward
(self, users, pos_items, neg_items)
recommenders/models/LightGCN.py:49
Method
forward
(self)
recommenders/models/Pop.py:25
Method
forward
(self)
recommenders/models/Random.py:23
Method
forward
(self, users, pos_items, neg_items)
recommenders/models/InfoNCE.py:49
Method
forward
(self, users, pos_items)
recommenders/models/InfoNCE.py:87
Method
forward
(self)
recommenders/models/base/abstract_model.py:68
Function
get_completion
(prompt, sys_prompt, model="gpt-3.5-turbo", temperature=0)
datasets/ml-1m/4_generate_persona.py:292
Function
get_data_format
(data_format)
recommenders/util/tool.py:45
Method
get_not_candidate
(self)
recommenders/data.py:324
Function
get_rotation_matrix
Find the rotation matrix associated with counterclockwise rotation about the given axis by theta radians. Credit: http://stackoverflow.co
recommenders/models/base/utils.py:224
Function
hist_2D
(group_data, labels, save_name, x_label, order, text_place, is_discrete=True, bins=60)
scripts/utils.py:293
Function
hist_3D
(group_data, labels, is_discrete=True, bins=60)
scripts/utils.py:230
Function
hist_group_results
(groups, bins=20)
scripts/utils.py:72
Function
hit
(rank, ground_truth)
recommenders/evaluator/backend/python/metric.py:8
Function
hook
(grad)
recommenders/models/base/utils.py:252
Function
hr
recommenders/evaluator/backend/cpp/include/metric.h:109
Method
importance_weighting
Weighting the importance of memory according to the results of recommendation and the personal taste
simulation/memory.py:283
Method
importance_weighting
Weighting the importance of memory according to the results of recommendation and the personal taste
simulation/base/abstract_memory.py:19
Method
initialize_all_avatars
initialize avatars
simulation/arena.py:40
Function
kl_divergence
(p, q)
scripts/utils.py:69
Method
load_additional_info
(self)
simulation/arena.py:24
Method
load_memory_variables
Return key-value pairs given the text input to the chain.
simulation/memory.py:65
Function
map
(rank, ground_truth)
recommenders/evaluator/backend/python/metric.py:34
Function
max_top_k
(a, top_k=50)
recommenders/util/tool.py:189
Method
memory_variables
Input keys this memory class will load dynamically.
simulation/memory.py:57
Function
merge_user_list_no_dup
(user_lists)
recommenders/models/base/utils.py:30
Method
metrics_info
Get all metrics information. Returns: str: A string consist of all metrics information, such as `"Precision@10 Pre
recommenders/evaluator/abstract_evaluator.py:13
Method
metrics_info
Get all metrics information. Returns: str: A string consist of all metrics information, such as `"Precision@10 Pre
recommenders/evaluator/grouped_evaluator.py:82
Method
metrics_info
Get all metrics information. Returns: str: A string consist of all metrics information, such as `"Precision@10
recommenders/evaluator/proxy_evaluator.py:87
Method
metrics_info
Get all metrics information. Returns: str: A string consist of all metrics information, such as `"Precision@10
recommenders/evaluator/backend/python/uni_evaluator.py:86
Method
metrics_info
Get all metrics information. Returns: str: A string consist of all metrics information, such as `"Precision@10
recommenders/evaluator/backend/cpp/uni_evaluator.py:98
Function
mrr
(rank, ground_truth)
recommenders/evaluator/backend/python/metric.py:58
Function
mrr
recommenders/evaluator/backend/cpp/include/metric.h:86
Function
ndcg
(rank, ground_truth)
recommenders/evaluator/backend/python/metric.py:47
Function
ndcg
recommenders/evaluator/backend/cpp/include/metric.h:66
Function
noise_validator
Validates the noise provided
recommenders/util/tool.py:110
Method
page_generator
generate one page items for one avatar
simulation/base/abstract_arena.py:212
Function
pair_plot
(y1, y2)
scripts/utils.py:164
Method
params_str
Get a summary of parameters. Returns: str: A string summary of parameters.
recommenders/util/configurator.py:104
Method
parse_response
(self, response)
simulation/arena.py:413
Method
pause_to_reflect_feeling
Reflect on recent observations and generate 'insights'.
simulation/memory.py:238
Method
pause_to_reflect_taste
Reflect on recent observations and generate 'insights'.
simulation/memory.py:226
Function
plot_bar
(data)
scripts/utils.py:214
Function
plot_rating
(x, y, type_name)
scripts/utils.py:132
Function
precision
recommenders/evaluator/backend/cpp/include/metric.h:17
Method
predict
(self, users, items=None)
recommenders/models/Pop.py:28
Method
predict
(self, users, items=None)
recommenders/models/Random.py:26
Method
predict
(self, users, items=None)
recommenders/models/MultVAE.py:161
Function
prepare_dir
(dir_path)
scripts/utils.py:62
Method
reaction_to_forced_items
Summarize the feelings of the avatar for recommended item list.
simulation/avatar.py:212
Function
recall
(rank, ground_truth)
recommenders/evaluator/backend/python/metric.py:27
Function
recall
recommenders/evaluator/backend/cpp/include/metric.h:31
Method
reflect
Generate a high level understanding of previous memories
simulation/base/abstract_memory.py:26
Method
reflection
Reflect on the observation bank
simulation/base/abstract_avatar.py:30
Function
restore_best_checkpoint
Restore the best performance checkpoint
recommenders/models/base/utils.py:121
Method
restore_checkpoint
If a checkpoint exists, restores the PyTorch model from the checkpoint. Returns the model and the current epoch.
simulation/base/abstract_arena.py:119
Method
save_context
Save the context of this model run to memory.
simulation/memory.py:52
Function
save_grad
(name)
recommenders/models/base/utils.py:251
Method
save_results
save the results of the simulation
simulation/arena.py:479
Method
save_user_dict_to_txt
(user_dict, base_path, filename)
simulation/arena.py:484
Method
score_normalizer
(val: float)
simulation/avatar.py:71
Method
set_optimizer
(self)
recommenders/models/MultVAE.py:31
Method
simulate_all_avatars
excute the simulation for all avatars
simulation/arena.py:188
Method
simulate_one_avatar
excute the simulation for one avatar
simulation/base/abstract_arena.py:230
Function
split_grp_view
(data,grp_idx)
recommenders/models/base/utils.py:204
Method
time_weighting
Weighting the memory according to the time
simulation/memory.py:277
Method
time_weighting
Weighting the memory according to the time
simulation/base/abstract_memory.py:13
Function
timer
The timer decorator
recommenders/util/tool.py:249
Method
train_one_epoch
(self, epoch)
recommenders/models/MF.py:15
Method
train_one_epoch
(self, epoch)
recommenders/models/LightGCN.py:15
Method
train_one_epoch
(self, epoch)
recommenders/models/Pop.py:18
Method
train_one_epoch
(self, epoch)
recommenders/models/Random.py:16
Method
train_one_epoch
(self, epoch)
recommenders/models/MultVAE.py:41
Method
train_one_epoch
(self, epoch)
recommenders/models/InfoNCE.py:16
Function
typeassert
(*type_args, **type_kwargs)
recommenders/util/tool.py:172
Function
uniform_loss
(x, t=2)
recommenders/models/base/utils.py:271
Method
up_date_taste
Update the taste of the avatar
simulation/base/abstract_avatar.py:36
← previous
next →
201–300 of 304, ranked by callers