Git Product home page Git Product logo

robust-representation's Introduction

Robust-Representation

##Introduction This code is an implementation the following work:

Learning Robust Representation of Text. Li, Yitong, Trevor Cohn and Timothy Baldwin. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (EMNLP 2016).

The code implements high-order derivative as regularization to learning robust model aganist noise based on Convolutional Neural Network (CNN) model.

###CNN implementations The CNN-model is following YoonKim's Convolutional Neural Networks for Sentence Classification and Denny Britz's implementation (https://github.com/dennybritz/cnn-text-classification-tf) in tensorflow.

###Data We evaluate on Pang and Lee's movie review dataset (MR) using 10-fold cross validation.

More data in the paper can be found at HarvardNLP.

And you can download a pre-trained word embeddings word2vec.

Please refer the original paper for details.

##Requrements

  • Python 2.7 or 3
  • Tensorflow
  • Numpy

##Running the model

Running the model using following commnad:

>python train.py [parameters]
parameters:
	--dropout_keep_prob 0.5
		Dropout keep probability (default: 0.5)
	--rb_lambda 1e-2
		Robust Regularizaion lambda (default: 1e-2)
	--alpha 0.1
		Data noise level alpha (default: 0.1)

For exmaple, training using robust regularization only (with 0.3 noise level):

>python train.py --alpha 0.3 --rb_lambda 1e-2  --dropout_keep_prob 1

CV score: 0.764398878813

training models with dropout only (with 0.3 noise level):

>python train.py --alpha 0.3 --dropout_keep_prob 0.5 --rb_lambda 0

CV score: 0.754831451178

Models can be found under 'runs' fold.

robust-representation's People

Contributors

lrank 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.