MCPcopy Create free account

hub / github.com/datawhalechina/fun-rec / functions

Functions1,084 in github.com/datawhalechina/fun-rec

Functionbuild_xdeepfm_model
构建 xDeepFM (极端深度因子分解机) 排序模型。 Args: feature_columns: FeatureColumn 列表 model_config: 包含参数的字典: - dnn_units: 列表,DNN
src/funrec/models/xdeepfm.py:13
Functionbuild_youtubednn_model
(feature_columns, model_config)
src/funrec/models/youtubednn.py:11
Functionc
()
docs/_static/underscore.js:6
Functionc
(e)
docs/_static/material-design-lite-1.3.0/material.min.js:8
Functioncache
( key, value )
docs/_static/jquery-3.6.0.js:910
Methodcall
对会话嵌入应用偏置编码。 参数: inputs:会话嵌入张量 形状:[batch_size, sess_max_count, sess_max_len, embedding_dim]
src/funrec/models/dsin.py:78
Methodcall
(self, inputs, mask=None, *args, **kwargs)
src/funrec/models/layers.py:19
Methodcall
(self, inputs, training=None)
src/funrec/models/layers.py:59
Methodcall
(self, x, **kwargs)
src/funrec/models/layers.py:76
Methodcall
(self, inputs)
src/funrec/models/layers.py:86
Methodcall
(self, inputs)
src/funrec/models/layers.py:101
Methodcall
(self, inputs)
src/funrec/models/layers.py:127
Methodcall
(self, inputs, mask=None, **kwargs)
src/funrec/models/layers.py:169
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:212
Methodcall
(self, inputs)
src/funrec/models/layers.py:246
Methodcall
(self, inputs, *args, **kwargs)
src/funrec/models/layers.py:274
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:315
Methodcall
(self, inputs, *args, **kwargs)
src/funrec/models/layers.py:384
Methodcall
前向传播逻辑。 Args: inputs (tf.Tensor): 输入张量,形状为(batch_size, seq_len, embedding_dim)。 mask (tf.Tensor): 掩码张量,形状为(b
src/funrec/models/layers.py:431
Methodcall
(self, inputs)
src/funrec/models/layers.py:484
Methodcall
(self, inputs, training=None)
src/funrec/models/layers.py:578
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:608
Methodcall
(self, inputs, mask=None, **kwargs)
src/funrec/models/layers.py:657
Methodcall
(self, inputs, *args, **kwargs)
src/funrec/models/layers.py:727
Methodcall
(self, target_index, embedding_table)
src/funrec/models/layers.py:758
Methodcall
(self, inputs, training=None)
src/funrec/models/layers.py:819
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:902
Methodcall
inputs: list, 包含所有特征的embedding矩阵, shape为[B, N, D]
src/funrec/models/layers.py:960
Methodcall
实现交叉层的计算: x_{l+1} = x_0 * x_l^T * w_l + b_l + x_l Args: x_0: 原始输入,shape: (batch_size, feature_embedding_dim)
src/funrec/models/layers.py:1039
Methodcall
(self, inputs, **kwargs)
src/funrec/models/layers.py:1101
Methodcall
CIN层的前向传播 Args: inputs: 特征embedding表示,shape为[B, field_num, emb_dim] Returns: CIN的最终输出张量
src/funrec/models/layers.py:1157
Methodcall
(self, inputs)
src/funrec/models/layers.py:1279
Methodcall
(self, inputs)
src/funrec/models/layers.py:1344
Methodcall
(self, inputs)
src/funrec/models/layers.py:1406
Methodcall
( self, inputs, attention_mask=None, training=None,
src/funrec/models/layers.py:1483
Methodcall
(self, query_vector, key_vectors)
src/funrec/models/layers.py:1545
Methodcall
(self, inputs)
src/funrec/models/layers.py:1598
Methodcall
(self, inputs, **kwargs)
src/funrec/models/layers.py:1619
Methodcall
前向传播方法 参数: inputs: 包含两个元素的列表 [x, scene_emb] x: 输入特征张量,形状为 (batch_size, input_dim) scene_emb: 场景嵌入
src/funrec/models/layers.py:1704
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:1822
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:1875
Methodcall
(self, inputs, training=None, **kwargs)
src/funrec/models/layers.py:1910
Methodcall
(self, ref_tensor)
src/funrec/models/layers.py:1931
Methodcall
(self, inputs, input_interval=None, training=True)
src/funrec/models/hstu.py:264
Methodcall
兴趣提取层的前向传播。 参数: inputs: 包含 [behavior_embeddings, neg_behavior_embeddings (可选)] 的列表 - behavior_embeddings
src/funrec/models/dien.py:100
Methodcall
兴趣演化层的前向传播。 参数: inputs: 包含 [interest_states, target_item_embedding] 的列表 - interest_states: 形状为 [batch_si
src/funrec/models/dien.py:292
Methodcall
AGRU 的前向传播。 参数: inputs: [interest_states, attention_scores] 的列表 - interest_states: 形状为 [batch_size, seq_
src/funrec/models/dien.py:406
Methodcall
AUGRU 的前向传播。 参数: inputs: [interest_states, attention_scores] 的列表 - interest_states: 形状为 [batch_size, seq
src/funrec/models/dien.py:485
Methodcall
(self, inputs)
src/funrec/models/fm_recall.py:23
Methodcall
(self, inputs)
src/funrec/models/fm_recall.py:38
Methodcall
(self, inputs)
src/funrec/models/fm_recall.py:53
Methodcall
(self, inputs)
src/funrec/models/fm_recall.py:67
Methodcall
(self, inputs)
src/funrec/models/fm_recall.py:82
Methodcall
参数: inputs: 特征嵌入 [batch_size, n+1, emb_dim], n 是特征数量,emb_dim 是嵌入维度 item_indices: 当前批次中每个样本对应的商品索引 [batch_size]
src/funrec/models/eges.py:120
Methodcan_handle
检查用户是否设置了 preferred_genres。 该策略要求用户明确设置类型偏好(通常在注册时)。
web_project/backend/online/cold_start/preferred_genre.py:25
Methodcan_handle
UCB 可以处理任何用户,但在有一些评分历史时效果最好。
web_project/backend/online/cold_start/ucb_genre.py:118
Methodcan_handle
始终返回 True - 这是一个降级策略。
web_project/backend/online/cold_start/popular.py:35
FunctioncaptureOutboundLink
(url)
docs/_static/d2l.js:224
Functionchain
(obj)
docs/_static/underscore-1.13.1.js:976
Functioncheck_identical_sequences
(group)
src/funrec/data/preprocess/kuairand.py:507
Functionchunk
(array, count)
docs/_static/underscore-1.13.1.js:1827
Methodclear_strategies
移除所有策略(实际上禁用重排序)
web_project/backend/online/reranking/service.py:101
Functioncompact
(array)
docs/_static/underscore-1.13.1.js:1693
Functioncompare_models
训练和评估多个模型并比较它们的指标。 每个模型可以通过以下方式指定: - name (str): 加载funrec.config下的模型 参数: models: 模型列表 verbose: 是否打印比较表格 ret
src/funrec/experiment.py:60
Functioncompleted
()
docs/_static/jquery-3.6.0.js:4117
Functioncompose
()
docs/_static/underscore-1.13.1.js:1194
Functioncompute_gauc
计算gAUC (Group AUC) - 每个用户的AUC的加权平均 Args: test_sample_dict: 测试样本字典 test_label_list: 测试标签列表 pred_ans: 模型预测结果 u
src/funrec/evaluation/metrics.py:177
Methodcompute_mask
(self, inputs, mask=None)
src/funrec/models/layers.py:467
Methodcompute_output_shape
(self, input_shape)
src/funrec/models/dsin.py:101
Methodcompute_output_shape
计算输出形状 根据输入形状计算输出形状。
src/funrec/models/layers.py:407
Methodconfigure_strategies
用新策略替换当前策略 Args: strategies: 要使用的 RerankingStrategy 实例列表。 策略将按提供的顺序应用。
web_project/backend/online/reranking/service.py:79
Functioncontrastive_loss
Batch内对比损失 (InfoNCE)。 参数: y_true: 未使用,但为了与Keras兼容而保留 y_pred: 来自模型的余弦相似度分数 temperature: 温度参数控制分布的集中度 返回: 对
src/funrec/training/loss.py:5
Functioncr
(n,r)
docs/_static/underscore.js:6
Functioncreate
(prototype, props)
docs/_static/underscore-1.13.1.js:623
FunctioncreateMovie
(movieData, posterFile)
web_project/frontend/src/services/api.js:83
FunctioncreateRating
(movieId, rating)
web_project/frontend/src/services/api.js:102
Functioncreate_dispersion_strategy
为任意特征创建自定义打散策略。 Args: feature_name: 特征名称(用于策略命名) feature_extractor: 从物品中提取打散键值的函数 max_consecutive: 允许的最大连续相同物品数量
web_project/backend/online/reranking/dispersion.py:241
Functioncreate_movie
创建新电影(仅管理员)
web_project/backend/app/api/v1/endpoints/movies.py:24
Functioncreate_or_update_rating
创建或更新电影评分(需要认证)
web_project/backend/app/api/v1/endpoints/ratings.py:46
Functiond
(e)
docs/_static/material-design-lite-1.3.0/material.min.js:8
Functiondebounce
(func, wait, immediate)
docs/_static/underscore-1.13.1.js:1144
FunctiondeconstructComponentInternal
* Check the component for the downgrade method. * Execute if found. * Remove component from createdComponents list. * * @param {?component
docs/_static/material-design-lite-1.3.0/material.js:374
FunctiondefaultPrefilter
( elem, props, opts )
docs/_static/jquery-3.6.0.js:7329
FunctiondeleteRating
(movieId)
web_project/frontend/src/services/api.js:119
Methoddelete_movie
从索引中删除电影
web_project/backend/app/services/elasticsearch_service.py:285
Functiondelete_rating
删除用户对电影的评分
web_project/backend/app/api/v1/endpoints/ratings.py:168
FunctiondisableScript
( elem )
docs/_static/jquery-3.6.0.js:5973
FunctiondoAnimation
()
docs/_static/jquery-3.6.0.js:7759
FunctiondowngradeNodesInternal
* Downgrade either a given node, an array of nodes, or a NodeList. * * @param {!Node|!Array<!Node>|!NodeList} nodes
docs/_static/material-design-lite-1.3.0/material.js:394
Methodenabled
检查重排序是否启用
web_project/backend/online/reranking/service.py:64
FunctionescapeChar
(match)
docs/_static/underscore-1.13.1.js:867
Functionescaper
(match)
docs/_static/underscore-1.13.1.js:809
Functionevery
(obj, predicate, context)
docs/_static/underscore-1.13.1.js:1402
Functionf
(e)
docs/_static/material-design-lite-1.3.0/material.min.js:9
FunctionfcamelCase
( _all, letter )
docs/_static/jquery-3.6.0.js:4212
Functionfcssescape
( ch, asCodePoint )
docs/_static/jquery-3.6.0.js:695
FunctionfindKey
(obj, predicate, context)
docs/_static/underscore-1.13.1.js:1232
FunctionfindWhere
(obj, attrs)
docs/_static/underscore-1.13.1.js:1317
Functionfirst
(array, n, guard)
docs/_static/underscore-1.13.1.js:1671
Methodfit
(self, train_hist_movie_id_list)
src/funrec/models/item2vec.py:16
← previousnext →801–900 of 1,084, ranked by callers