# How to find precision

**URL:** https://discuss.elastic.co/t/how-to-find-precision/15617
**Category:** Elasticsearch
**Created:** [February 5, 2014, 1:32pm UTC](https://discuss.elastic.co/t/how-to-find-precision/15617 "2014-02-05T13:32:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)
#### Post date: [February 5, 2014, 1:32pm UTC](https://discuss.elastic.co/t/how-to-find-precision/15617/1 "2014-02-05T13:32:05Z")

</div>

Hi,

This is actually not very related to elasticsearch, if i want to calculate  
the precision and recall how can i do it .....following is the scenario.

the formula for precision is :- No of relevant document retrieved / total  
no of document retrieved

how can we know that which of retrieved are relevant.

Is there is any approach we can follow to calculate which are relevant  
result.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7e93ee11-79b0-44c3-862f-15b71aeabb5e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7e93ee11-79b0-44c3-862f-15b71aeabb5e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [February 5, 2014, 4:28pm UTC](https://discuss.elastic.co/t/how-to-find-precision/15617/2 "2014-02-05T16:28:44Z")

</div>

Relevancy is very context dependent. Only you have the knowledge to  
determine if a result is relevant for the query or not.  
Lucene/elasticsearch's default TFIDF algorithm should theoretically give  
you the relevant results. Do the results change if you tweak your query  
slightly?

Recall is even harder than precision, because you would need to define  
ahead of time what your golden set of records will be for a specific query.  
Creating these golden records can be a challenge.

Cheers,

Ivan

On Wed, Feb 5, 2014 at 5:32 AM, Navneet Mathpal  
[navneetmathpal93@gmail.com](mailto:navneetmathpal93@gmail.com)wrote:

> Hi,
> 
> This is actually not very related to elasticsearch, if i want to calculate  
> the precision and recall how can i do it .....following is the scenario.
> 
> the formula for precision is :- No of relevant document retrieved /  
> total no of document retrieved
> 
> how can we know that which of retrieved are relevant.
> 
> Is there is any approach we can follow to calculate which are relevant  
> result.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/7e93ee11-79b0-44c3-862f-15b71aeabb5e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7e93ee11-79b0-44c3-862f-15b71aeabb5e%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCLY\_qXYnHWOMoTP5XAF7piNvqDDwhXK3CcvP%3D2tkEnPA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCLY_qXYnHWOMoTP5XAF7piNvqDDwhXK3CcvP%3D2tkEnPA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Navneet\_Mathpal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/navneet_mathpal/32/3677_2.png) [@Navneet\_Mathpal](https://discuss.elastic.co/u/Navneet_Mathpal)
#### Post date: [February 6, 2014, 4:13am UTC](https://discuss.elastic.co/t/how-to-find-precision/15617/3 "2014-02-06T04:13:51Z")

</div>

Ivan what I am doing is we have a set of good results and best results,if  
our output is coming from those good or best result will be consider as  
relevant record,

but what about those results which are not in good or best but can be  
relevant, how can we calculate the relevancy to find the rest of the  
result..?

On Wednesday, 5 February 2014 19:02:05 UTC+5:30, Navneet Mathpal wrote:

> Hi,
> 
> This is actually not very related to elasticsearch, if i want to calculate  
> the precision and recall how can i do it .....following is the scenario.
> 
> the formula for precision is :- No of relevant document retrieved /  
> total no of document retrieved
> 
> how can we know that which of retrieved are relevant.
> 
> Is there is any approach we can follow to calculate which are relevant  
> result.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/dfc2abe4-5822-46d0-ab3f-089338d9d02b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dfc2abe4-5822-46d0-ab3f-089338d9d02b%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:52am UTC](https://discuss.elastic.co/t/how-to-find-precision/15617/4 "2017-07-06T01:52:12Z")

</div>


