Giter Club home page Giter Club logo

weiboad's Introduction


使用公式W=TF+log(N/DF)计算权重
N:所有微博条数 在计算TF的时候,每次对一条微博进行操作,都输出一个 context.write(count,1)
TF:每个微博账号的每条微博下面,出现打车、滴滴,出租车等关键词的次数,都输出一个context.write(微博账号ID,1),注意一条微博里面有好几个关键词,那么就把这么多的关键词全部加进去 比如 199921:23 1223492:12
DF:所有出现过关键词的账号数量,我们通过对TF输出结果进行wordcount进行计算 

CalcTFAndN:计算TF与N,并且自定义了comparator,使得N在part-r-00001.TF在part-r-00000
CalcDF:直接去计算TF的行数(注意TF=0的不要算进去,本程序直接在CalcTFAndN中的Mpaaer添加了判断)

TODO:
调研权重公式
采用distributacacha进行分发log(N/DF)
爬虫又被和谐了

通过JobControl设置执行顺序:CalcTFAndN->CalcDF->CalcAll

weiboad's People

Contributors

winster-cheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.