Skip to content

Arstanley/fakenews_pscore_match

Repository files navigation

FakeNews Detection with Propensity Score Matching

This is a repository for Improving Generalizability of Fake News Detection Methods using Propensity Score Matching Note that the approach is in general suitable for any text analysis involving feature selection.

Repository Structure

Our implementation of Propensity Score Matching in text feature extraction is under the folder models. Specific application could be found in the notebook Training and Evaluation.ipynb.

Instructions

Clone the folder models to your own directory. Then import the propensity score module from it (Besides Propensity Score, I also included infomation gain for experimental purposes; feel free to use it :) ).

from models.propensity_score import propensity_score, info_gain

Then you can simply create an instance and fit your data, such as this:

p_score_gossipcop = propensity_score()
p_score_gossipcop.fit(gossipcop)

The acceptable input will be something like the following

Texts  |  Label

Illustrations

  • Model trained on features of gossip cop but evaluated on politifact. trained on gossipcop
  • Model trained on features of politifact but evaluated on gossipcop trained_on_politifact

Author

Bo Ni - initial commit - bni@nd.edu

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published