{
  "fetched_at": "2026-10-22T08:56:39Z",
  "source_url": "https://www.kaggle.com/competitions/actsc-468-w2018-vehicle-comp-claim-frequency/data",
  "pages": [
    {
      "name": "rules",
      "content": "\n\t<!-- Begin Base Rules -->\n    <h3>One account per participant</h3>\n    <p>You cannot sign up to Kaggle from multiple accounts and therefore you cannot submit from multiple accounts.</p>\n    <h3>No private sharing outside teams</h3>\n    <p>\n        Privately sharing code or data outside of teams is not permitted.\n        It's okay to share code if made available to all participants on the forums.\n    </p>\n    <h3>Team Mergers</h3>\n    <p>Team mergers are not allowed in this competition.</p>\n\n    <h3>Team Limits</h3>\n    <p>There is no maximum team size.</p>\n    <h3>Submission Limits</h3>\n    <p>You may submit a maximum of 3 entries per day.</p>\n    <p>You may select up to 3 final submissions for judging.</p>\n    <h3>Competition Timeline</h3>\n    <p>Start Date: <strong>TBA</strong></p>\n    <p>Merger Deadline: <strong>None</strong></p>\n    <p>Entry Deadline: <strong>None</strong></p>\n    <p>End Date: <strong>2/1/2014 12:00 AM UTC</strong></p>\n\t<!-- End Base Rules -->\n<p>The rules page is a bit special: it will auto-update the text based on the parameters of the competition. The rules you need to add here are any additional rules relating to dataset usage. You may also put grading information here.</p>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "data-description",
      "content": "<p>Please see the course website for a description of the dataset.</p>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Description",
      "content": "<h2>Introduction</h2>\n<p>Welcome to the frequency prediction \"competition\" for Actsc 468 (Winter 2018).</p>\n<p>This competition will help you gauge how well your model performs relative to those of your peers.</p>\n<p>The objective to build as good a model as possible to predict the likelihood of comprehensive claims. The training data consist of 160,853 rows, whereas the testing data consist of 47,896 rows. Please see the course webpage for more information on the dataset. </p>\n<h2>Rules</h2>\nCurrently, the Rules section doesn't seem to be working properly. Here are the rules:\n\n<p>Your Kaggle account name should be your 8 digit UW ID, e.g. 20561748.</p>\n <strong>One account per participant</strong>\n<p>You cannot sign up to Kaggle from multiple accounts and therefore you cannot submit from multiple accounts.</p>\n<strong>No private sharing outside teams</strong>\n<p>\n    Privately sharing code or data outside of teams is not permitted.\n    It's okay to share code if made available to all participants on the forums.\n</p>\n<strong>Team Mergers</strong>\n<p>Team mergers are not allowed in this competition.</p>\n<strong>Team Limits</strong>\n<p>You are to work individually on this project.</p>\n<strong>Submission Limits</strong>\n<p>You may submit a maximum of 3 entries per day.</p>\n<p>You may select up to 3 final submissions for judging.</p>\n<strong>Competition Timeline</strong>\n<p>Start Date: <strong>TBA</strong></p>\n<p>End Date: <strong>March 2nd, 2018 11:59 PM</strong></p>\n\n<h2>Evaluation Metric</h2>\n<p>Please see the 'Evaluation' section.</p>\n<h2>The submission process</h2>\n<p>During the competition, when you make a submission, 20% of your predictions will be evaluated against the true values and you will get a \"public score\" . Your UW ID, number of submissions, and best public score will be displayed on the \"public leaderboard\".</p>\n<p>You may make a maximum of 3 submissions per day (the day starts at 7:00pm) until the deadline: March 2, 2017 at 11:59pm (local time).</p>\n<p>The \"final score\" will be evaluated on the remaining 80% of your predictions. Before the deadline, choose up to 3 submissions against which the final score will be evaluated.</p>\n<h2>Forum</h2>\n<p>While a forum is available on Kaggle, it will not be monitored. Please post any questions on the Piazza forum.</p>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Evaluation",
      "content": "<p>Reference: https://www.kaggle.com/c/liberty-mutual-fire-peril/details/evaluation</p>\n<p>Submissions are evaluated on the normalized, weighted Gini co-efficient. The weights used in the calculation are represented by Comp_Earned_Count in the dataset.</p>\n<p>To calculate the normalized weighted Gini, your predictions are sorted from largest to smallest. This is the only step where the explicit prediction values are used (i.e. only the order of your predictions matters). We then move from largest to smallest, asking \"In the leftmost x% of the data, how much of the actual observed, weighted loss (the target multiplied by the provided weight) have you accumulated?\" With no model, you expect to accumulate 10% of the loss in 10% of the predictions, so no model (or a \"null\" model) achieves a straight line. The area between your curve and this straight line is the Gini coefficient.</p>\n<p>There is a maximum achievable area for a perfect model. The normalized Gini is obtained by dividing the weighted Gini coefficient of your model by the weighted Gini coefficient of a perfect model.</p>\n<h2>Submission Format</h2>\n<p>Your submission should be in a CSV file with exactly 47,896 rows (including the header) and 2 columns:</p>\n<ul>\n<li>The first column is the unique row 'id' provided within the dataset</li>\n<li>The second column is the predicted claim frequency for the corresponding id. It should be non-negative.</li>\n</ul>\n<p>The CSV file would have a format like the following:</p>\n<pre>id,predictions<br />1,0.45<br />2,2.1<br />3,0.01<br />4,0.56<br />etc.<br /><br /></pre>\n<p>Sample code to generate a CSV of holdout predictions for an intercept-only model is as follows:</p>\n<pre># Import data<br />require(data.table)<br />train = fread(\"compDatasetTrain.csv\")<br />test = fread(\"compDatasetTest.csv\")<br /># Construct intercept-only model<br />glmMod = glm(Comp_Claim_Count ~ 1, data = train, family = poisson(link = \"log\"), offset = log(Comp_Earned_Count))<br /># Order the test dataset by id<br />test = test[order(test$id),] <br /># Compute predictions - predicted frequency is equal to the predicted comp claim count divided by the comp earn count<br />predictions = predict(glmMod, newdata = test, <br />type = \"response\")/test$Comp_Earned_Count<br /># Save predictions<br />write.csv(data.frame(\"id\" = test$id, \"predictions\" = predictions), \"mySubmission.csv\", row.names = F)</pre>\n<p>The above code will output a file titled \"mySubmission.csv\" in your working directory. Submit it by going to the \"Make a Submission\" tab (on the left pane), uploading the \"mySubmission.csv\" file, and clicking \"Submit\". If the submission is successful (i.e. in the correct format), it will be scored and you will be re-directed to the Public Leaderboard -- at this point, if the submission is better than your previous submission, the score on the Public Leaderboard will be revised to reflect the better score; if it is not better than the previous submission, your score on the Public Leaderboard will not change.</p>\n<p>Let's revise the sample code to generate predictions for a simple model with Accident Year and 2 randomly selected predictors (Driver_Age, and Comp_Deductible):</p>\n<pre># Import data<br />require(data.table)<br />train = fread(\"compDatasetTrain.csv\")<br />test = fread(\"compDatasetTest.csv\")<br /># Impute Driver_Age in train and test with median Driver_Age - of the three selected predictors, it is the only 1 with missing values <br />medianDriverAge = median(c(train$Driver_Age, test$Driver_Age), na.rm = T)<br />train[is.na(train$Driver_Age), \"Driver_Age\"] = medianDriverAge<br />test[is.na(test$Driver_Age), \"Driver_Age\"] = medianDriverAge<br /># Construct model with Accident year and 2 randomly selected predictors<br />glmMod = glm(Comp_Claim_Count ~ Accident_Year + Driver_Age + Comp_Deductible, data = train, family = poisson(link = \"log\"), offset = log(Comp_Earned_Count))<br /># Order the test dataset by id<br />test = test[order(test$id),] <br /># Compute predictions - predicted frequency is equal to the predicted comp claim count divided by the comp earn count<br />predictions = predict(glmMod, newdata = test, type = \"response\")/test$Comp_Earned_Count<br /># Save predictions<br />write.csv(data.frame(\"id\" = test$id, \"predictions\" = predictions), \"mySubmission2.csv\", row.names = F)<br /><br /></pre>\n<p>The above code will output a file titled \"mySubmission2.csv\" in your working directory. Perform the same process as for \"mySubmission.csv\" to score this submission.</p>\n<p>Note: The above model is a crude model mainly for the purpose of illustration. In reality, you may choose to fit accident year as a categorical variable instead of a continuous one.</p>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    }
  ]
}