![](https://img-blog.csdnimg.cn/20200219171151892.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
推荐系统
推荐类算法
JohnManLi
分享,学习
展开
-
求AUC,accuracy
import pandas as pdimport lightgbm as lgbfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import label_binarizefrom sklearn.ensemble import RandomForestClassifierfrom sklearn.ensemble import GradientBoostingClassifierfr.原创 2020-08-13 16:51:52 · 298 阅读 · 0 评论 -
生成式模型和判别式模型的区别
判别模型(discriminative model)通过求解条件概率分布P(y|x)或者直接计算y的值来预测y。 线性回归(Linear Regression),逻辑回归(Logistic Regression),支持向量机(SVM), 传统神经网络(Traditional Neural Networks),线性判别分析(Linear Discriminative Analysis),条件随机场(Conditional Random Field) 生成模型(generative model..原创 2020-08-10 09:37:56 · 434 阅读 · 0 评论 -
NDCG计算
import numpy as npdef getDCG(scores): return np.sum( np.divide(np.power(2, scores) - 1, np.log(np.arange(scores.shape[0], dtype=np.float32) + 2)), dtype=np.float32)def getNDCG(rank_list, pos_items): relevance = np.ones_like(p.原创 2020-06-10 17:36:13 · 989 阅读 · 0 评论