您的位置:首页 > 大数据 > 人工智能

RunningMapReduceExampleTFIDF - hadoop-clusternet - This document describes how to run the TF-IDF MapReduce example against ascii books. - This project is for those who wants to experiment hadoop as a skunkworks in a small cluster (1-10 nodes) - Google Pro

2012-09-23 08:58 941 查看
RunningMapReduceExampleTFIDF - hadoop-clusternet - This document describes how to run the TF-IDF MapReduce example against ascii books. - This project is for those who wants to experiment hadoop as a skunkworks in a small cluster (1-10 nodes) - Google Project Hosting

// inverse document frequency quotient between the number of docs in corpus and number of docs the
// term appears Normalize the value in case the number of appearances is 0.
double idf = Math.log10((double) numberOfDocumentsInCorpus /
(double) ((numberOfDocumentsInCorpusWhereKeyAppears == 0 ? 1 : 0) +
numberOfDocumentsInCorpusWhereKeyAppears));

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐