GithubHelp home page GithubHelp logo

set_project's Introduction

Modules Required:
scikitpy
nltk

Folder and Scripts

Folders:

models: has the training and test data stored  in various formats using pickle files
stats: has  various text files that describe the statistics of the  training and test corpora
eg:
1000_bigrams.txt has the precision, recall and f_score of the runs by choosing 1000 bigrams as features
bigram_diff.txt  has the list of bigrams  ordered by its relative_frequency  in the descending order
(no of postitive occurences- no of negative negative occurences/positive occurences+negative occurences)
bigram_diff_total.txt has the list of bigrams  ordered by its frequency with respect to the occurences in the total number of sentences  in the descending order

(no of postitive occurences- no of negative negative occurences/total_number_of_sentences)
 the occurence of bigrams and trigrams is counted one per sentence

Train:contains the train DrugBank and Medline Corpus
Test: contains the test DrugBank and Medline Corpus

Classification: Has scripts for  constructing the feature vector from the training  and corpus and the svm classifier script build using scikit's svm

Important Scripts

view_stats.py - 

Usage: view_stats.py <typeofstats> <corpus>

typeofstats can be unigram bigram or trigram

corpus can take value test or train

Description:

This script  is used to  get the  stats from the   tuype of corpora provided as input


construct_train_corpus.py 

Description:

This script  is used to gather stats about the train corpus like the number of bigrams,trigrams, sentences with drug interactions and sentences without drug interactions

construct_training_mode.py

Description:

This script is used to generate the  list of bigrams  based on the relative frequency of occurences and the total frequency with respect to the sentences


get_model_data.py <number_of_bigrams>

Description:

This script is used to generate a model file with the required number of bigrams  from both the bigram dictionaries( bigrams ordered based on the realtive frequency and bigrams based on the  total sentence count)

identify.py

Description:

Used to evaluate the  bigram based feature set on training model and test model
note: path has to be changed in the script in order to run it against train corpus

Run:
get_model_data.py 16000
identify.py
_____________________________________________________________________________________________________________
classifier/main.py
used to generate the training feature vector (based on bigrams, interaction words, dependency parsed sentences)from the training corpus

classifier/main_test.py
used to generate the  feature vectors for the test corpus

classifier/classifier.py
uses the svm classifier to classify the test  sentences based on support vector machines.
The test feature vector and the training feature vector constructed through  the main.py and main_test.py scripts are used here



Run:
main.py
main_test.py
classifier.py

set_project's People

Contributors

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