{
  "id": 133840,
  "title": "2015-2019 NCAA true labels",
  "url": "/competitions/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/discussion/133840",
  "author_name": "Roman",
  "post_date": "2020-03-04T15:06:10.472000",
  "votes": -2,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I have already posted a similar discussion in 2020-NCAAM, called <a href=\"https://www.kaggle.com/c/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/discussion/131539\">How to score 0 and why you should not do this</a>.</p>\n\n<p>Decided to go a little further and\n1. Post a dataset with true labels for 2015-2019 NCAA (both Men and Women). Here it is: <a href=\"https://www.kaggle.com/nroman/ncaa-20152019-labels\">https://www.kaggle.com/nroman/ncaa-20152019-labels</a></p>\n\n<ol>\n<li>Show a code to create a datafile with true labels for NCAAW. Here it is:\n```\nsub = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WSampleSubmissionStage1_2020.csv')</li>\n</ol>\n\n<p>WNCAATourneyCompactResults = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WDataFiles_Stage1/WNCAATourneyCompactResults.csv')</p>\n\n<p>sub = pd.concat([sub, sub['ID'].str.split('_', expand=True).rename(columns={0: 'Season', 1: 'Team1', 2: 'Team2'}).astype(np.int64)], axis=1)</p>\n\n<p>merge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team1', 'Team2'], right_on=['Season', 'WTeamID', 'LTeamID'])</p>\n\n<p>sub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 1</p>\n\n<p>merge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team2', 'Team1'], right_on=['Season', 'WTeamID', 'LTeamID'])</p>\n\n<p>sub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 0\n```</p>\n\n<p>Once again - there is no reason to submit it, since first stage of the competition is irrelevant. But instead one might use those true labels to as a validation set in the model.</p>",
  "messages": [
    {
      "id": 763514,
      "postDate": "2020-03-04T15:06:10.473Z",
      "content": "<p>I have already posted a similar discussion in 2020-NCAAM, called <a href=\"https://www.kaggle.com/c/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/discussion/131539\">How to score 0 and why you should not do this</a>.</p>\n\n<p>Decided to go a little further and\n1. Post a dataset with true labels for 2015-2019 NCAA (both Men and Women). Here it is: <a href=\"https://www.kaggle.com/nroman/ncaa-20152019-labels\">https://www.kaggle.com/nroman/ncaa-20152019-labels</a></p>\n\n<ol>\n<li>Show a code to create a datafile with true labels for NCAAW. Here it is:\n```\nsub = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WSampleSubmissionStage1_2020.csv')</li>\n</ol>\n\n<p>WNCAATourneyCompactResults = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WDataFiles_Stage1/WNCAATourneyCompactResults.csv')</p>\n\n<p>sub = pd.concat([sub, sub['ID'].str.split('_', expand=True).rename(columns={0: 'Season', 1: 'Team1', 2: 'Team2'}).astype(np.int64)], axis=1)</p>\n\n<p>merge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team1', 'Team2'], right_on=['Season', 'WTeamID', 'LTeamID'])</p>\n\n<p>sub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 1</p>\n\n<p>merge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team2', 'Team1'], right_on=['Season', 'WTeamID', 'LTeamID'])</p>\n\n<p>sub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 0\n```</p>\n\n<p>Once again - there is no reason to submit it, since first stage of the competition is irrelevant. But instead one might use those true labels to as a validation set in the model.</p>",
      "rawMarkdown": "I have already posted a similar discussion in 2020-NCAAM, called [How to score 0 and why you should not do this](https://www.kaggle.com/c/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/discussion/131539).\n\nDecided to go a little further and\n1. Post a dataset with true labels for 2015-2019 NCAA (both Men and Women). Here it is: https://www.kaggle.com/nroman/ncaa-20152019-labels\n\n2. Show a code to create a datafile with true labels for NCAAW. Here it is:\n```\nsub = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WSampleSubmissionStage1_2020.csv')\n\nWNCAATourneyCompactResults = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WDataFiles_Stage1/WNCAATourneyCompactResults.csv')\n\nsub = pd.concat([sub, sub['ID'].str.split('_', expand=True).rename(columns={0: 'Season', 1: 'Team1', 2: 'Team2'}).astype(np.int64)], axis=1)\n\nmerge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team1', 'Team2'], right_on=['Season', 'WTeamID', 'LTeamID'])\n\nsub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 1\n\nmerge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team2', 'Team1'], right_on=['Season', 'WTeamID', 'LTeamID'])\n\nsub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 0\n```\n\nOnce again - there is no reason to submit it, since first stage of the competition is irrelevant. But instead one might use those true labels to as a validation set in the model.",
      "votes": -2
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "763514": "I have already posted a similar discussion in 2020-NCAAM, called [How to score 0 and why you should not do this](https://www.kaggle.com/c/google-cloud-ncaa-march-madness-2020-division-1-mens-tournament/discussion/131539).\n\nDecided to go a little further and\n1. Post a dataset with true labels for 2015-2019 NCAA (both Men and Women). Here it is: https://www.kaggle.com/nroman/ncaa-20152019-labels\n\n2. Show a code to create a datafile with true labels for NCAAW. Here it is:\n```\nsub = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WSampleSubmissionStage1_2020.csv')\n\nWNCAATourneyCompactResults = pd.read_csv('../input/google-cloud-ncaa-march-madness-2020-division-1-womens-tournament/WDataFiles_Stage1/WNCAATourneyCompactResults.csv')\n\nsub = pd.concat([sub, sub['ID'].str.split('_', expand=True).rename(columns={0: 'Season', 1: 'Team1', 2: 'Team2'}).astype(np.int64)], axis=1)\n\nmerge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team1', 'Team2'], right_on=['Season', 'WTeamID', 'LTeamID'])\n\nsub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 1\n\nmerge = pd.merge(sub, WNCAATourneyCompactResults[['Season', 'WTeamID', 'LTeamID']], how='left', left_on=['Season', 'Team2', 'Team1'], right_on=['Season', 'WTeamID', 'LTeamID'])\n\nsub.loc[~merge['WTeamID'].isnull(), 'Pred'] = 0\n```\n\nOnce again - there is no reason to submit it, since first stage of the competition is irrelevant. But instead one might use those true labels to as a validation set in the model."
  }
}