GithubHelp home page GithubHelp logo

msc-thesis2016's Introduction

Topic modeling on EU and the USA research projects

A MSc thesis for AUEB MSc in Computer science.

Authors

  • Maria Iliadi
  • Panos Louridas

This repository stores all the files of the MSc thesis. Here we present code to obtain topics from the projects funded under the European Union Framework Programmes, and for project funded by the NSF in the United States. We use Latent Dirichlet allocation for topic modeling in projects' abstracts that funded from 1994 to 2017.

Getting Started

The src folder consists of all the code for generating LDA topics. eu and usa folders consist of:

  • *_raw_data: the raw data of each region, before the first preprocessing
  • *_data_load_per_FP.ipynb: the IPython notebook for loading the raw data, get the abstracts and save them as CSV files in the dataset folder for later use. In the USA dataset, you need to run the notebook, in order to create the dataset folder and the CSV files.
  • dataset: the data (project abstracts) after preprocessing. The projects are grouped in both regions based on the FP/year that they got funded.
  • *_iterations.py: the code for generating the topics per FP, using LDA.
  • lda_saved: folder that contains the saved LDA model per FP (after training).
  • *_figures: the wordclouds of the topics per FP, saved as PNG files.

Generating LDA topics

To produce the topics for each FP, run:

python eu_iterations.py FP_name [OPTIONS] python usa_iterations.py FP_name [OPTIONS]

where:

  • FP_name is one of the following: FP4, FP5, FP6, FP7, H2020
  • -i or --iterations: the number of iterations for the LDA model. By default it's 7000 for the EU dataset and 8000 for the USA.

The outcome is a set of 10 topics pictured as wordclouds, which they display the 20 top words with the highest probability of belonging to the topic.

Similarity of topics

compare_FPs_topics.py: in order to calculate the similarity of the topics between the two regions (per FP), we calculate the JSD for each pair of topics and save the results in a CSV file (in the compared_FPs folder).

To run the code:

python compare_FPs_topics.py FP_name

where FP_name is one of the following: FP4, FP5, FP6, FP7, H2020.

Requirements

  • Python version 2.7 or later
  • pandas 0.20 or later
  • numpy 1.12 or later
  • scipy 0.19 or later
  • gensim 2.1 or later
  • matplotlib 2.0 or later
  • wordcloud 1.3
  • ipython 5.4 combined with jupyter
  • seaborn 0.7

msc-thesis2016's People

Contributors

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