Code Monkey home page Code Monkey logo

nlp-williams's Introduction

Williams test

Significance test of increase in correlation for NLP evaluations in python

Prerequisites

  • python3
  • numpy, scipy

Usage

To run a one-sided application of Williams Test to test the significance of the increase in correlation between r12 and r13 below, with sample size n, where

  • r12: Pearson correlation between Human scores and metric A,
  • r13: Pearson correlation between Human scores and metric B,
  • r23: Pearson correlation between metric A and metric B.

This returns the p-value for the test that r12 is greater than r13.

For example, Williams test with the following:

$ python3 williams.py --r12 0.65 --r13 0.55 --r23 0.3 --n 50

Will produce the following output:

-----------------------------------------
Williams Test for Increase in Correlation

    r12 correlation( Human, metric A ) : 0.65
    r13 correlation( Human, metric B ) : 0.55
    r23 correlation( metric A, metric B) : 0.3

    Sample size: 50

P-value: 0.20928617286753592
-----------------------------------------

Since p > 0.05, the increase in correlation is not significant.


Reference

  1. https://github.com/ygraham/nlp-williams
  2. Yvette Graham & Timothy Baldwin. "Testing for Significance of Increased Correlation with Human Judgment", EMNLP 2014.

nlp-williams's People

Contributors

inmoonlight avatar

Stargazers

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