from math import log
def cal_ctr(loss, pred):
return (loss + log(1-pred)) / (log(1-pred) - log(pred))
def log_loss(true_label, predict_label):
return - true_label * log(predict_label) - (1 - true_label) * log(1 - predict_label)
contest相关文章
最近热门
- SSB - Sample Selection Bias - 样本选择偏差问题
- Masked Language Model(MLM)掩码语言模型
- ITC(Image-Text Contrastive)loss和ITM(Image-Text Matching)loss
- SIFT(Scale-Invariant Feature Transform):图像特征提取的经典算法
- tf.reduce_sum
- Frequent Directions (FD) 一种高效且精确的矩阵略图算法
- 推荐系统 | 生成式推荐
- Context Parallel(简称CP)并行化技术
- 7.1.1 设置spark.driver.maxResultSize
- C++ 整形数转字符串
最常浏览
- 016 推荐系统 | 排序学习(LTR - Learning To Rank)
- 偏微分符号
- i.i.d(又称IID)
- 利普希茨连续条件(Lipschitz continuity)
- (error) MOVED 原因和解决方案
- TextCNN详解
- 找不到com.google.protobuf.GeneratedMessageV3的类文件
- Deployment failed: repository element was not specified in the POM inside distributionManagement
- cannot access com.google.protobuf.GeneratedMessageV3 解决方案
- CLUSTERDOWN Hash slot not served 问题原因和解决办法
×