{
  "id": 2380,
  "title": "Duplicated variables and molecules",
  "url": "/competitions/MerckActivity/discussion/2380",
  "author_name": "",
  "post_date": "2012-08-18T14:19:19.690Z",
  "votes": 1,
  "comment_count": 16,
  "views": 9119,
  "content": "<p>There are duplicates in molecule names in several training dataset (ACT1, 6, 8, 10). But variable values of those molecules are different. Also&nbsp;there are a lot of duplicates in names of variables in training and test sets. But values of variables with identical\r\n names are different. (I didn't check all datasets comprehensively yet).</p>\r\n<p>What does it mean? Are they mistakes or not?</p>",
  "messages": [
    {
      "id": "13188",
      "postDate": "08/18/2012 14:19:19",
      "content": "<p>There are duplicates in molecule names in several training dataset (ACT1, 6, 8, 10). But variable values of those molecules are different. Also&nbsp;there are a lot of duplicates in names of variables in training and test sets. But values of variables with identical\r\n names are different. (I didn't check all datasets comprehensively yet).</p>\r\n<p>What does it mean? Are they mistakes or not?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13189",
      "postDate": "08/18/2012 14:31:13",
      "content": "<p>As described on the <a href=\"https://www.kaggle.com/c/MerckActivity/details/data\">\r\ndata</a> page, some molecules and some descriptors appear in multiple data sets. That means a given molecule was tested in multiple panels/assays to get descriptors and may have multiple types of activity.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13190",
      "postDate": "08/18/2012 16:06:54",
      "content": "<p>I apologize for ambiguity in my previous post. I mean that there are variables with identical names within each separate dataset. And the same for molecules. This isn't described in data description.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13198",
      "postDate": "08/18/2012 21:28:54",
      "content": "<p>Drrr, thanks for the clarification and finding the error. You were correct. I've fixed the changes and updated the TrainingSet file. Please download the new files.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13211",
      "postDate": "08/19/2012 05:00:22",
      "content": "<p>Thanks.<br>\r\nI cannot check all datasets again, but I just look at one dataset (ACT10) and found that variables with identical names are still present. Please pay attantion, that there a lot of variables with identical names and probably different values in all training\r\n and test sets. For example in ACT10 dataset the variable D<em>OkX8OkX88</em> is repeated twice, etc.<br>\r\nIf you need I can send you names of all duplicated variables in each dataset. But it can be easily retrived by colnames(df)[duplicated(colnames(df))]. Check please.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13220",
      "postDate": "08/19/2012 16:17:22",
      "content": "<p>Hi Drrr, I've checked all of the data sets and there are no duplicated column names (descriptor names) in each data set for any of the data sets.</p>\r\n<p>I think you might be changing the headers when reading the file. For instance, you pointed to descriptor = &quot;DOkX8OkX88&quot;, but this string does not exist in ACT10. The actual descriptor names in ACT10 are &quot;D_OkX8OkX88_&quot; and &nbsp;&quot;D_OkX8OkX88_.1&quot; (cols 4, 5). These\r\n are unique strings and thus unique column ids. This happens again with cols 7, 8 with &quot;D_OkX8OkX8X_&quot; and &quot;D_OkX8OkX8X_.1&quot; and actually quite often throughout, which might be why you think this is happening repeatedly.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13222",
      "postDate": "08/19/2012 17:53:57",
      "content": "<p>Yes, if you use default options during loading dataset in R (check.names=TRUE), all duplicated column names will be changed in the manner you desribed. But in initial dataset there a lot of duplicated variable names, please look at csv-files. That is why\r\n I never use defualt options at file loading to avoid implicit conversions.</p>\r\n<p>df &lt;- read.table(file.name, header=T, sep=&quot;,&quot;, check.names=F, as.is=T)<br>\r\ncolnames(df)[duplicated(colnames(df))]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13223",
      "postDate": "08/19/2012 18:20:12",
      "content": "<p>[quote=jcnhvnhck;13220]</p>\r\n<p>For instance, you pointed to descriptor = &quot;DOkX8OkX88&quot;, but this string does not exist in ACT10. The actual descriptor names in ACT10 are &quot;D_OkX8OkX88_&quot; and &nbsp;&quot;D_OkX8OkX88_.1&quot; (cols 4, 5). These are unique strings and thus unique column ids.</p>\r\n<p>[/quote]</p>\r\n<p>There is no &quot;D_OkX8OkX8X_.1&quot; in the downloaded ACT10_competition_training.csv (in TrainingSet.zip).<br>\r\nThe header starts with &quot;MOLECULE,Act,D_OkX8OkX88Y,D_OkX8OkX88_,D_OkX8OkX88_,D_OkX8OkX8XX,D_OkX8OkX8X_,&quot;<br>\r\n<br>\r\n</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13224",
      "postDate": "08/19/2012 18:54:29",
      "content": "<p>Hey all,</p>\r\n<p>there are like 9804 duplicate attribute names in both train and test files (some attributes appear 3,4,5 or 6 times). Check added file for them if You are interested.&nbsp;</p>\r\n<p>1st col: filename</p>\r\n<p>2nd col: colname</p>\r\n<p>3rd col: dupe count</p>\r\n<p>4th col: indexes of dupe in the list of the header of the file</p>\r\n<p>Best,</p>\r\n<p>ivo</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13233",
      "postDate": "08/20/2012 13:13:38",
      "content": "<p>Drrr and ivo, Thanks to you both for your help with this. I understand the problem and am working with the Competition Sponsor to get the corrected data sets. I will post a new forum post when the new files are ready later today.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13298",
      "postDate": "08/22/2012 00:05:02",
      "content": "<p>We are still waiting for new files right? (kind of anxious to have them :) )</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13299",
      "postDate": "08/22/2012 00:22:43",
      "content": "<p>Some variables such as D<em>PX8PX88</em>.1 in set 2 have very different distributions in the training set and the testing set.\r\n</p>\r\n<blockquote>\r\n<p>table(training.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 4 5 6 8 <br>\r\n6586 237 1720 96 59 2 14 2 <br>\r\ntable(test.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 9 <br>\r\n2550 106 232 18 1 <br>\r\nI guess this issue will be fixed with the new files.<br>\r\nThanks, Xavier</p>\r\n</blockquote>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13300",
      "postDate": "08/22/2012 01:23:23",
      "content": "<p>Thank you everyone for your patience as we worked through the data issues. New data files are now\r\n<a href=\"https://www.kaggle.com/c/MerckActivity/data\">available</a>. Molecule names and descriptors names have been simplified to avoid special characters and avoid file reading problems. Also, files should contain only unique molecules and unique descriptors\r\n within each data set. As described previously, some molecules and descriptors will appear in multiple data sets.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13316",
      "postDate": "08/22/2012 10:34:52",
      "content": "<p>[quote=Gxav (Xavier Conort);13299]</p>\r\n<p>Some variables such as D<em>PX8PX88</em>.1 in set 2 have very different distributions in the training set and the testing set.</p>\r\n<blockquote>\r\n<p>table(training.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 4 5 6 8 <br>\r\n6586 237 1720 96 59 2 14 2 <br>\r\ntable(test.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 9 <br>\r\n2550 106 232 18 1 <br>\r\nI guess this issue will be fixed with the new files.<br>\r\nThanks, Xavier</p>\r\n</blockquote>\r\n<p>[/quote]</p>\r\n<p>How the test molecules are selected? randomly or test set are an specific molecules type that the promoter has interest in them?</p>\r\n<p>The test set generation must be detailed in each challenge profile.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13329",
      "postDate": "08/22/2012 13:04:39",
      "content": "<p>Re: Test Set Generation</p>\r\n<p>Is it really that hard to figure out if the test and training sets are random samples from the same population? I realize it's fairly high dimensional data, but you can reduce those dimensions and make visual comparisons.</p>\r\n<p>I don't recall reading anything that says they have to confirm how they made the test set. Furthermore, I don't think I'd trust anything that was said since there are many cooks in the kitchen (Kaggle &amp; Merck at least). It's not that hard to run some tests\r\n yourself.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13388",
      "postDate": "08/24/2012 03:43:30",
      "content": "<p>I finally spent some time with this data.</p>\r\n<p>Given the current test &amp; train sets, I do not believe they were sampled form the same population at all. If you graph the points by their first couple principal components, you can see clear separation between test &amp; train data.</p>\r\n<p>With this knowledge, I would not expect standard cross-validated error estimates to give anything approaching a leaderboard score.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "13405",
      "postDate": "08/24/2012 15:14:35",
      "content": "Because who doesn't enjoy pretty pictures? Here's probably the most extreme example of separation I found (Activity 5). Red=Test, Blue=Train You'll have to take it on faith I did the dimensionality reduction correctly. Well, that or you can do it yourself\r\n to confirm.",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 13189,
      "author_name": "joycenv",
      "author_url": "",
      "post_date": "08/18/2012 14:31:13",
      "content": "<p>As described on the <a href=\"https://www.kaggle.com/c/MerckActivity/details/data\">\r\ndata</a> page, some molecules and some descriptors appear in multiple data sets. That means a given molecule was tested in multiple panels/assays to get descriptors and may have multiple types of activity.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13190,
      "author_name": "drrr11321",
      "author_url": "",
      "post_date": "08/18/2012 16:06:54",
      "content": "<p>I apologize for ambiguity in my previous post. I mean that there are variables with identical names within each separate dataset. And the same for molecules. This isn't described in data description.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13198,
      "author_name": "joycenv",
      "author_url": "",
      "post_date": "08/18/2012 21:28:54",
      "content": "<p>Drrr, thanks for the clarification and finding the error. You were correct. I've fixed the changes and updated the TrainingSet file. Please download the new files.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13211,
      "author_name": "drrr11321",
      "author_url": "",
      "post_date": "08/19/2012 05:00:22",
      "content": "<p>Thanks.<br>\r\nI cannot check all datasets again, but I just look at one dataset (ACT10) and found that variables with identical names are still present. Please pay attantion, that there a lot of variables with identical names and probably different values in all training\r\n and test sets. For example in ACT10 dataset the variable D<em>OkX8OkX88</em> is repeated twice, etc.<br>\r\nIf you need I can send you names of all duplicated variables in each dataset. But it can be easily retrived by colnames(df)[duplicated(colnames(df))]. Check please.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13220,
      "author_name": "joycenv",
      "author_url": "",
      "post_date": "08/19/2012 16:17:22",
      "content": "<p>Hi Drrr, I've checked all of the data sets and there are no duplicated column names (descriptor names) in each data set for any of the data sets.</p>\r\n<p>I think you might be changing the headers when reading the file. For instance, you pointed to descriptor = &quot;DOkX8OkX88&quot;, but this string does not exist in ACT10. The actual descriptor names in ACT10 are &quot;D_OkX8OkX88_&quot; and &nbsp;&quot;D_OkX8OkX88_.1&quot; (cols 4, 5). These\r\n are unique strings and thus unique column ids. This happens again with cols 7, 8 with &quot;D_OkX8OkX8X_&quot; and &quot;D_OkX8OkX8X_.1&quot; and actually quite often throughout, which might be why you think this is happening repeatedly.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13222,
      "author_name": "drrr11321",
      "author_url": "",
      "post_date": "08/19/2012 17:53:57",
      "content": "<p>Yes, if you use default options during loading dataset in R (check.names=TRUE), all duplicated column names will be changed in the manner you desribed. But in initial dataset there a lot of duplicated variable names, please look at csv-files. That is why\r\n I never use defualt options at file loading to avoid implicit conversions.</p>\r\n<p>df &lt;- read.table(file.name, header=T, sep=&quot;,&quot;, check.names=F, as.is=T)<br>\r\ncolnames(df)[duplicated(colnames(df))]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13223,
      "author_name": "alegro",
      "author_url": "",
      "post_date": "08/19/2012 18:20:12",
      "content": "<p>[quote=jcnhvnhck;13220]</p>\r\n<p>For instance, you pointed to descriptor = &quot;DOkX8OkX88&quot;, but this string does not exist in ACT10. The actual descriptor names in ACT10 are &quot;D_OkX8OkX88_&quot; and &nbsp;&quot;D_OkX8OkX88_.1&quot; (cols 4, 5). These are unique strings and thus unique column ids.</p>\r\n<p>[/quote]</p>\r\n<p>There is no &quot;D_OkX8OkX8X_.1&quot; in the downloaded ACT10_competition_training.csv (in TrainingSet.zip).<br>\r\nThe header starts with &quot;MOLECULE,Act,D_OkX8OkX88Y,D_OkX8OkX88_,D_OkX8OkX88_,D_OkX8OkX8XX,D_OkX8OkX8X_,&quot;<br>\r\n<br>\r\n</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13224,
      "author_name": "iamivo",
      "author_url": "",
      "post_date": "08/19/2012 18:54:29",
      "content": "<p>Hey all,</p>\r\n<p>there are like 9804 duplicate attribute names in both train and test files (some attributes appear 3,4,5 or 6 times). Check added file for them if You are interested.&nbsp;</p>\r\n<p>1st col: filename</p>\r\n<p>2nd col: colname</p>\r\n<p>3rd col: dupe count</p>\r\n<p>4th col: indexes of dupe in the list of the header of the file</p>\r\n<p>Best,</p>\r\n<p>ivo</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13233,
      "author_name": "joycenv",
      "author_url": "",
      "post_date": "08/20/2012 13:13:38",
      "content": "<p>Drrr and ivo, Thanks to you both for your help with this. I understand the problem and am working with the Competition Sponsor to get the corrected data sets. I will post a new forum post when the new files are ready later today.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13298,
      "author_name": "jscheibel",
      "author_url": "",
      "post_date": "08/22/2012 00:05:02",
      "content": "<p>We are still waiting for new files right? (kind of anxious to have them :) )</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13299,
      "author_name": "xavierconort",
      "author_url": "",
      "post_date": "08/22/2012 00:22:43",
      "content": "<p>Some variables such as D<em>PX8PX88</em>.1 in set 2 have very different distributions in the training set and the testing set.\r\n</p>\r\n<blockquote>\r\n<p>table(training.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 4 5 6 8 <br>\r\n6586 237 1720 96 59 2 14 2 <br>\r\ntable(test.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 9 <br>\r\n2550 106 232 18 1 <br>\r\nI guess this issue will be fixed with the new files.<br>\r\nThanks, Xavier</p>\r\n</blockquote>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13300,
      "author_name": "joycenv",
      "author_url": "",
      "post_date": "08/22/2012 01:23:23",
      "content": "<p>Thank you everyone for your patience as we worked through the data issues. New data files are now\r\n<a href=\"https://www.kaggle.com/c/MerckActivity/data\">available</a>. Molecule names and descriptors names have been simplified to avoid special characters and avoid file reading problems. Also, files should contain only unique molecules and unique descriptors\r\n within each data set. As described previously, some molecules and descriptors will appear in multiple data sets.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13316,
      "author_name": "blindape",
      "author_url": "",
      "post_date": "08/22/2012 10:34:52",
      "content": "<p>[quote=Gxav (Xavier Conort);13299]</p>\r\n<p>Some variables such as D<em>PX8PX88</em>.1 in set 2 have very different distributions in the training set and the testing set.</p>\r\n<blockquote>\r\n<p>table(training.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 4 5 6 8 <br>\r\n6586 237 1720 96 59 2 14 2 <br>\r\ntable(test.E2$D<em>PX8PX88</em>.1)<br>\r\n0 1 2 3 9 <br>\r\n2550 106 232 18 1 <br>\r\nI guess this issue will be fixed with the new files.<br>\r\nThanks, Xavier</p>\r\n</blockquote>\r\n<p>[/quote]</p>\r\n<p>How the test molecules are selected? randomly or test set are an specific molecules type that the promoter has interest in them?</p>\r\n<p>The test set generation must be detailed in each challenge profile.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13329,
      "author_name": "biasvariance",
      "author_url": "",
      "post_date": "08/22/2012 13:04:39",
      "content": "<p>Re: Test Set Generation</p>\r\n<p>Is it really that hard to figure out if the test and training sets are random samples from the same population? I realize it's fairly high dimensional data, but you can reduce those dimensions and make visual comparisons.</p>\r\n<p>I don't recall reading anything that says they have to confirm how they made the test set. Furthermore, I don't think I'd trust anything that was said since there are many cooks in the kitchen (Kaggle &amp; Merck at least). It's not that hard to run some tests\r\n yourself.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13388,
      "author_name": "biasvariance",
      "author_url": "",
      "post_date": "08/24/2012 03:43:30",
      "content": "<p>I finally spent some time with this data.</p>\r\n<p>Given the current test &amp; train sets, I do not believe they were sampled form the same population at all. If you graph the points by their first couple principal components, you can see clear separation between test &amp; train data.</p>\r\n<p>With this knowledge, I would not expect standard cross-validated error estimates to give anything approaching a leaderboard score.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 13405,
      "author_name": "biasvariance",
      "author_url": "",
      "post_date": "08/24/2012 15:14:35",
      "content": "Because who doesn't enjoy pretty pictures? Here's probably the most extreme example of separation I found (Activity 5). Red=Test, Blue=Train You'll have to take it on faith I did the dimensionality reduction correctly. Well, that or you can do it yourself\r\n to confirm.",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "13188": "",
    "13189": "",
    "13190": "",
    "13198": "",
    "13211": "",
    "13220": "",
    "13222": "",
    "13223": "",
    "13224": "",
    "13233": "",
    "13298": "",
    "13299": "",
    "13300": "",
    "13316": "",
    "13329": "",
    "13388": "",
    "13405": ""
  },
  "source": "meta"
}