Code Monkey home page Code Monkey logo

fasttext_shortad's Introduction

fastText_shortAd_Classification

微信广告正负样本分类

参考http://blog.csdn.net/lxg0807/article/details/52960072

Dependencies

run success : python3

the dependenceies is saved /usr/local/lib/python3.5/dist-packages/fastText,includeing FastText.py,please pay attention to the Uppercase 'F' 'T' and lowercase letters 'f' 't'.

$ pip install jieba
$ pip install fasttext 

# import fastText.FastText as fasttext 
# also don't need to pip , directly import fastText

正样本:

  • xx,xxx,xxxxxxxxx

负样本:

  • 微信公众号 AppSo,回复「钱包」看看微信钱包这 6 个秘密使用技巧

  • 微信号:wszs1981

  • 长按二维码关注

其中,训练集正负样本各1W+,测试集样本各5K+

训练数据集: data/train/fastText_train.txt 测试数据集: data/test/fastText_test.txt

输入数据为分词后带标签数据,数据预处理:

python data/train/pre_processing.py
python data/test/pre_progressing.py

测试数据集:data/test/fastText_text.txt

训练模型:

python train_model.py

测试模型:

python test_model.py

result

__label__not_ad:    precision:0.879189	 recall:0.992830	 f:0.932560
__label__ad:	    precision:0.989747	 recall:0.835337	 f:0.906010

fasttext_shortad's People

Contributors

jiangyiqiao avatar

Watchers

James Cloos 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.