Git Product home page Git Product logo

irhackathon's Introduction

IRHackathon

Code evaluation

Time

In order to get your time score, replace the comments with your code for each section.

Indexing

    start_indexing_time = time.time()
    '''
    
    Insert indexing functionality
    
    '''
    end_indexing_time = time.time()

Retrieval

    start_retrieval_time = time.time()
    '''
    
    Insert retrieval functionality
    
    '''
    end_retrieval_time = time.time()

Evaluation

In order to use the given evaluation class please go through the following stages:

   cd <project directory>/evaluator/trec_eval.9.0
   make
   cp trec_eval ../
   chmod +x ../trec_eval

The metrics we will use are:

  • MAP
  • nDCG@20
  • Precision@5
  • Precision@10

In order to check your results with the metrics above you can use the code below:

    from evaluator.evaluate import Eval
    ...
    ...
    evaluation = Eval(trec_file, qrels)
    evaluation.run_evaluation()

Where:

  • trec_file - Path to scores file
  • qrels - Path to relevance judgement file
  • Results of evaluation will be written in a file named "results_of_retrieval"

Scores file format:

query-id Q0 document-id 1 score hackathon

For example:

  • 750 Q0 GX261-61-14975000 1 0.333 hackathon
  • 750 Q0 GX261-70-6119593 1 0.311 hackathon
  • ...
  • ...

Important Note - results file should be sorted by query - id(ascending), score(descending), document-id(descending).

Relevance judgment file:

The file is located at data/qrels.gov2_train.all

irhackathon's People

Contributors

itaigat avatar greggoren avatar

Stargazers

Tuobang Li avatar

Watchers

 avatar  avatar

Forkers

sharonpe

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.