Giter Club home page Giter Club logo

cs224n_assignments's Introduction

CS224N Assignments

Solutions for cs224n(Deep Learning For Natural Language Processing) course by stanford university

Prerequisites

  1. Install Anaconda
  2. go to assignmentX where X is either 1, 2, 3 using a Terminal:
    $ cd \path\to\assignment1
  3. create a python 2.7 environnment using
    $ conda env -n cs224n python=2.7 anaconda
  4. activate your environment using (add source before activate if you're working with Linux/Mac)
    $ activate cs224n
  5. install the dependencies using requirements.txt
    $ pip install -r requirements.txt
  6. Don't forget to deactivate your environment when you're done (add source before deactivate if you're on Linux/Mac)
    $ deactivate cs224n

Deployment

Assignment 1

Word2vec

Steps for training Word2vec in assignment 1 :

  1. Go to folder /assignment 1
  2. Run get_datasets.sh(By running this file you can download datasets)
  3. Open a terminal and write(Be careful, for this assignment you should have installed python2.7) :
    $ python q3_run.py

Sentiment Analysis(before you running this section you should download datasets as i mentioned in Word2vec section)

  1. If you want to use logistic regression classifier on word vectors that we trained in Word2vec section you can use this code :
    $ cd path/to/assignment1
    $ python q4_sentiment.py --yourvectors
  2. If you want to use pretrained GLOVE model you can use this code :
    $ cd path/to/assignment1
    $ python q4_sentiment.py --pretrained

Results

Assignment 1

Word2vec

images

Sentiment analysis train/dev accuracy

images

Sentiment analysis truth table

images

Built With

  • Numpy - A library for doing optimized matrix operations
  • Matplotlib - A library for visulizing our outputs as graphs
  • scipy - A Library for doing mathematic, science and engineering stuff.
  • sklearn - Simple and efficient Library for data mining and data analysis

License

This project is licensed under the MIT License - see the LICENSE.md file for details

cs224n_assignments's People

Contributors

erfanmhi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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