Answers.Body: <p>The confidence equation you are referring to is the definition of <a href="https://en.wikipedia.org/wiki/Precision_and_recall" rel="nofollow noreferrer">precision</a> in the Classification/pattern-recongition/information-retrieval contexts. You can visually understand the equation with the help of the following figure from the wikipedia page:</p>
  
  <p><a href="https://i.sstatic.net/xJyTh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/xJyTh.png" alt="Visual representation of Precision which you interchangeably with confidence"></a></p>
  
  <pre><code> P     : Refers to the set of samples in your dataset. (Selected elements)
  |P|    : Refers to the number of samples in your dataset.
   D     : Refers to the set of correct class labels.(aka. Ground Truth).
  |P &amp; D|: Refers to the number of samples in the dataset that the classifier correctly labeled. 
  </code></pre>
  
  <p>I hope with this understanding you can implement the fitness function for your Genetic Algorithm. If you want more help in defining the fitness function, then you should probably add details about your approach or links to the research paper you are trying to follow.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-26T21:45:12.737Z
Answers.Text: Thank you for your reply, I've edited my original post and linked the research paper I've mainly been studying. The problem I'm trying to solve is one of the data sets used in the paper (iris data).
Answers.UserDisplayName: Astronought
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-26T22:06:25.700Z
Answers.Text: So from what I understand from the information you provided, do I need to keep referring to the initial items within the data set during the evaluation of a rule's fitness? Lets say I start of with 150 items (50 of each), and during the selection of a given generation I end up with 70 items where 30 of the items are for the classification I am trying to discover a rule for (and the remaining 40 would be split between the remaining two classes), would the equation for the precision be as follows: (30/70) and for the recall 30/50?
Answers.UserDisplayName: Astronought
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-26T04:14:42.007Z
Answers.LastActivityDate: 2017-03-26T04:14:42.007Z
Answers.UserDisplayName: PraveenPalanisamy
Body: <p>I'm attempting to develop a genetic algorithm capable of discovering classification rules for a given data set, a number of papers make use of the <em>confidence</em> (precision) and <em>coverage</em> of a rule to define its fitness. In particular, I've been following <a href="https://pdfs.semanticscholar.org/1b5e/829fa6bc465784ed244fb2bb9eff82042e78.pdf" rel="nofollow noreferrer">this paper</a>.</p>
  <p>However, I'm not sure my understanding of the equations is correct.</p>
  <p>In <a href="https://pdfs.semanticscholar.org/1b5e/829fa6bc465784ed244fb2bb9eff82042e78.pdf" rel="nofollow noreferrer">that paper</a>, the confidence is defined as</p>
  <p><span class="math-container">$$\text{conf} = \frac{|P \land D|}{|P|}$$</span></p>
  <p>They describe it as follows</p>
  <blockquote>
  <p>In classification problems, confidence measure is defined as the ratio of the number of examples in P that are correctly classified as decision class of D and the number of examples in P.</p>
  </blockquote>
  <p>Is this saying the total number of occurrences of the attributes in a given rule <span class="math-container">$P$</span> which occur in rules which have been classified as class <span class="math-container">$D$</span>, by the number of attributes in <span class="math-container">$P$</span>?</p>
  <p>Where an example of a rule containing two attributes would be as follows:</p>
  <p>(<em>martial_status = married</em>  &amp;  <em>age &gt; 30</em>)</p>
  <p>It seems a number of papers define it differently which has led to my confusion, if anyone is able to confirm my understanding or provide an some insight that'd be great.</p>
  
Tags: <classification><papers><evolutionary-algorithms><fitness-functions><precision>
Title: Is my understanding of confidence (precision) correct?
UserDisplayName: Astronought
ThreadText: # Is my understanding of confidence (precision) correct?
  
  (Asked by: username_0 on 2017-03-24)
  
  I'm attempting to develop a genetic algorithm capable of discovering classification rules for a given data set, a number of papers make use of the *confidence* (precision) and *coverage* of a rule to define its fitness. In particular, I've been following [this paper](https://pdfs.semanticscholar.org/1b5e/829fa6bc465784ed244fb2bb9eff82042e78.pdf).
  
  However, I'm not sure my understanding of the equations is correct.
  
  In [that paper](https://pdfs.semanticscholar.org/1b5e/829fa6bc465784ed244fb2bb9eff82042e78.pdf), the confidence is defined as
  
  $$\text{conf} = \frac{|P \land D|}{|P|}$$
  
  They describe it as follows
  
  > In classification problems, confidence measure is defined as the ratio of the number of examples in P that are correctly classified as decision class of D and the number of examples in P.
  
  Is this saying the total number of occurrences of the attributes in a given rule $P$ which occur in rules which have been classified as class $D$, by the number of attributes in $P$?
  
  Where an example of a rule containing two attributes would be as follows:
  
  (*martial\_status = married* & *age > 30*)
  
  It seems a number of papers define it differently which has led to my confusion, if anyone is able to confirm my understanding or provide an some insight that'd be great.
  
  **Tags:** classification, papers, evolutionary-algorithms, fitness-functions, precision
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-03-26. Score: 1
  
  The confidence equation you are referring to is the definition of [precision](https://en.wikipedia.org/wiki/Precision_and_recall) in the Classification/pattern-recongition/information-retrieval contexts. You can visually understand the equation with the help of the following figure from the wikipedia page:
  
  [![Visual representation of Precision which you interchangeably with confidence](https://i.sstatic.net/xJyTh.png)](https://i.sstatic.net/xJyTh.png)
  
  ```
   P     : Refers to the set of samples in your dataset. (Selected elements)
  |P|    : Refers to the number of samples in your dataset.
   D     : Refers to the set of correct class labels.(aka. Ground Truth).
  |P & D|: Refers to the number of samples in the dataset that the classifier correctly labeled. 
  
  ```
  
  I hope with this understanding you can implement the fitness function for your Genetic Algorithm. If you want more help in defining the fitness function, then you should probably add details about your approach or links to the research paper you are trying to follow.
  
  > **Comments:**
  > **username_0**: Thank you for your reply, I've edited my original post and linked the research paper I've mainly been studying. The problem I'm trying to solve is one of the data sets used in the paper (iris data).  
  > **username_0**: So from what I understand from the information you provided, do I need to keep referring to the initial items within the data set during the evaluation of a rule's fitness? Lets say I start of with 150 items (50 of each), and during the selection of a given generation I end up with 70 items where 30 of the items are for the classification I am trying to discover a rule for (and the remaining 40 would be split between the remaining two classes), would the equation for the precision be as follows: (30/70) and for the recall 30/50?  
  
  ---
  
  