mahout读感(初次了解).docx

mahout读感(初次了解)精要

Mahout----Recommended一.开始:数据文件:FileDataModel:只能访问以“,”分割的平文件,可以是压缩的。类似cvs格式,不适用非常大的文件,程序会忽略空行以及以#开头的。用户相似度两个人相似:UserSimilarity:根据他们的洗好来,表示两个用户的相似度的接口,返回值为double类型,在-1到1之间,1表示完全相识。PearsonCorrelationSimilarity:两个人喜好相似度,采用算法:sumX2: sum of the square of all Xs preference valuessumY2: sum of the square of all Ys preference valuessumXY: sum of the product of X and Ys preference value for all items for which both X and Y express a preference公式:sumXY / sqrt(sumX2 * sumY2)相似邻居UserNeighborhood:获取一组和给定的用户相似的邻居。NearestNUserNeighborhood:获取N个最近的邻居(应该是最相似的)ThresholdUserNeighborhood:获取相似度大于等于某个数值界限的所有邻居,thresh

文档评论(0)

1亿VIP精品文档

相关文档