{
  "id": 5610,
  "title": "Need Clearification for Scoring",
  "url": "/competitions/facebook-recruiting-iii-keyword-extraction/discussion/5610",
  "author_name": "",
  "post_date": "2013-09-01T08:48:58.813Z",
  "votes": null,
  "comment_count": 7,
  "views": 3278,
  "content": "<p>In the evaluation section it says</p>\n<p>&quot;To receive credit, the tag you predict must be an exact match&quot;</p>\n<p>In the case of the correct tags is &quot;javascript html css&quot;, if we produce the prediction of &quot;javascript&quot;, is it counted as 1 true positive, or as 1 negative? And if the prediction is &quot;javascript html css&quot;, the evaluation result is it 1 true positive or 3 positives? Are the tags produced evaluated separately for each question, or the combination is evaluated?</p>\n<p>&nbsp;</p>",
  "messages": [
    {
      "id": "29905",
      "postDate": "09/01/2013 08:48:58",
      "content": "<p>In the evaluation section it says</p>\n<p>&quot;To receive credit, the tag you predict must be an exact match&quot;</p>\n<p>In the case of the correct tags is &quot;javascript html css&quot;, if we produce the prediction of &quot;javascript&quot;, is it counted as 1 true positive, or as 1 negative? And if the prediction is &quot;javascript html css&quot;, the evaluation result is it 1 true positive or 3 positives? Are the tags produced evaluated separately for each question, or the combination is evaluated?</p>\n<p>&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "29910",
      "postDate": "09/01/2013 09:11:49",
      "content": "<p>[quote=weidong Liang;29905]</p>\n<p>In the evaluation section it says</p>\n<p>&quot;To receive credit, the tag you predict must be an exact match&quot;</p>\n<p>In the case of the correct tags is &quot;javascript html css&quot;, if we produce the prediction of &quot;javascript&quot;, is it counted as 1 true positive, or as 1 negative? And if the prediction is &quot;javascript html css&quot;, the evaluation result is it 1 true positive or 3 positives? Are the tags produced evaluated separately for each question, or the combination is evaluated?</p>\n<p>[/quote]</p>\n<p>&nbsp;</p>\n<p>Since F1-Score is calculated for ever individual class and only then is the mean taken. Therefore, it is highly likely that the strings in the Tags column will be split and the individual tags used for scoring.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "29931",
      "postDate": "09/01/2013 14:10:53",
      "content": "<p>The case where you predict 'javascript', you should get one true positive, zero false positives and two false negatives. In the second case if you predict 'javascript html css', you will get three true positives, zero false negatives and zero false positives. &nbsp;Thus on these observations you will get a precisions of 1 / (1 + 0) = 1 and 3 / (3 + 0) = 1. You will get recalls of 1 / (1 + 2) = 1/3 and 3 / (3 + 0) = 1. &nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "32241",
      "postDate": "10/11/2013 04:44:48",
      "content": "<p>Hi,</p>\n<p>There are two different answers here that actually raise an interesting question. I re-read the evaluation details and cannot find the answer. (initially I had the same intuition as Kenny)</p>\n<p>Are the tp, fp, tn, fn, computed across each &quot;class&quot; (i.e. each tag) or across each post ?</p>\n<p>Best,&nbsp;<br>Lorenzo</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "32245",
      "postDate": "10/11/2013 07:31:29",
      "content": "<p>I am considering mean across each post and validation is differentially consistent so far.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "32254",
      "postDate": "10/11/2013 15:50:23",
      "content": "<p>As cross-validation of Kenny:</p>\n<p>The way I calculate the F1-score is to split the outcome variable, giving the actual amount of tags that have to be predicted. I just sum all of these, then given, say case 100, if I predict &quot;javascript&quot; and it is in [&quot;javascript&quot;, &quot;css&quot;, &quot;html&quot;], then I count it as a true positive. If you do not also predict &quot;css&quot; and &quot;html&quot;, these will get added to the false negative list.</p>\n<p>&nbsp;</p>\n<p>Precision = true positive / total amount of your predictions = &nbsp;1</p>\n<p>Recall &nbsp; &nbsp; &nbsp;= true positive / total amount of (unobserved) tags that should be predicted = 1/3</p>\n<p>&nbsp;</p>\n<p>F1-score =&nbsp;2 * (p * r / (p + r) = 1 * (1 * 1/3 / (1 + 1/3)) = 0.4</p>\n<p>&nbsp;</p>\n<p>Based on cross-validation of train/test, I would say this is correct.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "32298",
      "postDate": "10/12/2013 22:37:55",
      "content": "<p>[quote=weidong Liang;29905]</p>\n<p>&quot;To receive credit, the tag you predict must be an exact match&quot;</p>\n<p>In the case of the correct tags is &quot;javascript html css&quot;, if we produce the prediction of &quot;javascript&quot;,&nbsp;</p>\n<p>[/quote]</p>\n<p>&nbsp;</p>\n<p>The (set of) tags on each item are evaluated separately. Thus your example&nbsp;counts as 1 true positive + 2 false negatives.</p>\n<p>The &quot;exact match&quot; refers to each tag, not the set, so if you predicted &quot;javascript-library&quot; instead of &quot;javascript&quot;, that would also be a negative, since the (sister) tag isn't an exact match.</p>\n<p>&nbsp;</p>\n<p>As to how we determine what is/isn't a sister tag, see also&nbsp;<a href=\"https://www.kaggle.com/c/facebook-recruiting-iii-keyword-extraction/forums/t/5791/public-data-tag-definitions-and-synonyms\">my question about we can legally automatically determine&nbsp;which tags are synonymous/related</a>?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "33695",
      "postDate": "11/14/2013 08:30:52",
      "content": "<p>What about the converse situation where I have predicted too many tags? Say for example the correct output is [&quot;javascript&quot;] and I have calculated [&quot;javascript&quot;, &quot;java&quot;, &quot;js&quot;, &quot;html&quot;, &quot;css&quot;], then would it mean I have 1 tp, 4 fp, 0tn, 0fn?&nbsp;</p>\n<p>So to clarify is it correct that any tags that aren't predicted are counted as false negatives (fn) and any extra tags that are predicted are counted as false positives (fp)?</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 29910,
      "author_name": "rohits",
      "author_url": "",
      "post_date": "09/01/2013 09:11:49",
      "content": "<p>[quote=weidong Liang;29905]</p>\n<p>In the evaluation section it says</p>\n<p>&quot;To receive credit, the tag you predict must be an exact match&quot;</p>\n<p>In the case of the correct tags is &quot;javascript html css&quot;, if we produce the prediction of &quot;javascript&quot;, is it counted as 1 true positive, or as 1 negative? And if the prediction is &quot;javascript html css&quot;, the evaluation result is it 1 true positive or 3 positives? Are the tags produced evaluated separately for each question, or the combination is evaluated?</p>\n<p>[/quote]</p>\n<p>&nbsp;</p>\n<p>Since F1-Score is calculated for ever individual class and only then is the mean taken. Therefore, it is highly likely that the strings in the Tags column will be split and the individual tags used for scoring.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 29931,
      "author_name": "darrelkj",
      "author_url": "",
      "post_date": "09/01/2013 14:10:53",
      "content": "<p>The case where you predict 'javascript', you should get one true positive, zero false positives and two false negatives. In the second case if you predict 'javascript html css', you will get three true positives, zero false negatives and zero false positives. &nbsp;Thus on these observations you will get a precisions of 1 / (1 + 0) = 1 and 3 / (3 + 0) = 1. You will get recalls of 1 / (1 + 2) = 1/3 and 3 / (3 + 0) = 1. &nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 32241,
      "author_name": "lorenzolucido",
      "author_url": "",
      "post_date": "10/11/2013 04:44:48",
      "content": "<p>Hi,</p>\n<p>There are two different answers here that actually raise an interesting question. I re-read the evaluation details and cannot find the answer. (initially I had the same intuition as Kenny)</p>\n<p>Are the tp, fp, tn, fn, computed across each &quot;class&quot; (i.e. each tag) or across each post ?</p>\n<p>Best,&nbsp;<br>Lorenzo</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 32245,
      "author_name": "emiliogortizg",
      "author_url": "",
      "post_date": "10/11/2013 07:31:29",
      "content": "<p>I am considering mean across each post and validation is differentially consistent so far.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 32254,
      "author_name": "pvkooten",
      "author_url": "",
      "post_date": "10/11/2013 15:50:23",
      "content": "<p>As cross-validation of Kenny:</p>\n<p>The way I calculate the F1-score is to split the outcome variable, giving the actual amount of tags that have to be predicted. I just sum all of these, then given, say case 100, if I predict &quot;javascript&quot; and it is in [&quot;javascript&quot;, &quot;css&quot;, &quot;html&quot;], then I count it as a true positive. If you do not also predict &quot;css&quot; and &quot;html&quot;, these will get added to the false negative list.</p>\n<p>&nbsp;</p>\n<p>Precision = true positive / total amount of your predictions = &nbsp;1</p>\n<p>Recall &nbsp; &nbsp; &nbsp;= true positive / total amount of (unobserved) tags that should be predicted = 1/3</p>\n<p>&nbsp;</p>\n<p>F1-score =&nbsp;2 * (p * r / (p + r) = 1 * (1 * 1/3 / (1 + 1/3)) = 0.4</p>\n<p>&nbsp;</p>\n<p>Based on cross-validation of train/test, I would say this is correct.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 32298,
      "author_name": "smcinerney",
      "author_url": "",
      "post_date": "10/12/2013 22:37:55",
      "content": "<p>[quote=weidong Liang;29905]</p>\n<p>&quot;To receive credit, the tag you predict must be an exact match&quot;</p>\n<p>In the case of the correct tags is &quot;javascript html css&quot;, if we produce the prediction of &quot;javascript&quot;,&nbsp;</p>\n<p>[/quote]</p>\n<p>&nbsp;</p>\n<p>The (set of) tags on each item are evaluated separately. Thus your example&nbsp;counts as 1 true positive + 2 false negatives.</p>\n<p>The &quot;exact match&quot; refers to each tag, not the set, so if you predicted &quot;javascript-library&quot; instead of &quot;javascript&quot;, that would also be a negative, since the (sister) tag isn't an exact match.</p>\n<p>&nbsp;</p>\n<p>As to how we determine what is/isn't a sister tag, see also&nbsp;<a href=\"https://www.kaggle.com/c/facebook-recruiting-iii-keyword-extraction/forums/t/5791/public-data-tag-definitions-and-synonyms\">my question about we can legally automatically determine&nbsp;which tags are synonymous/related</a>?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 33695,
      "author_name": "matthewthornton",
      "author_url": "",
      "post_date": "11/14/2013 08:30:52",
      "content": "<p>What about the converse situation where I have predicted too many tags? Say for example the correct output is [&quot;javascript&quot;] and I have calculated [&quot;javascript&quot;, &quot;java&quot;, &quot;js&quot;, &quot;html&quot;, &quot;css&quot;], then would it mean I have 1 tp, 4 fp, 0tn, 0fn?&nbsp;</p>\n<p>So to clarify is it correct that any tags that aren't predicted are counted as false negatives (fn) and any extra tags that are predicted are counted as false positives (fp)?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "29905": "",
    "29910": "",
    "29931": "",
    "32241": "",
    "32245": "",
    "32254": "",
    "32298": "",
    "33695": ""
  },
  "source": "meta"
}