## Overarching Goal
It is your job to predict if a passenger survived the sinking of the Titanic or not.
For each in the test set, you must predict a 0 or 1 value for the variable.

## Metric
Your score is the percentage of passengers you correctly predict. This is known as accuracy.

## Submission File Format for Predictions to Kaggle
You should submit a `.csv` file with exactly 418 entries plus a header row. Your submission will show an error if you have extra columns (beyond `PassengerId` and `Survived`) or rows.

The file should have exactly 2 columns:
- `PassengerId` (sorted in any order)
- `Survived` (contains your binary predictions: 1 for survived, 0 for deceased)

For example:
```
PassengerId, Survived
892, 0
893, 1
894, 0
...
```

You can download an example submission file (gender_submission.csv) on the [Data](https://www.kaggle.com/competitions/dma2022-competition/data) page.

## Evaluation
The grading for Lab 5 is out of 20 points: twice the points for a lab twice the length.

The grading for this lab is comprised of two parts:
- **due 10/9:** Checkpoint (Lab 5a), 2 pts possible
- **due 10/16:** Optimization (Lab 5b), 18 pts possible

Please note that there are two leaderboards, a **public** leaderboard and a **private** leaderboard. You will only have access to the public leaderboard. The public leaderboard is comprised of 40% of the data provided in `test.csv`, while the private leaderboard is comprised of the complement (the other 60%). It is possible for your team to receive a 100% on this lab while only considering the public leaderboard. However, any Extra Credit will rely on your model performing well on the private leaderboard, which you won't have access to.

## Checkpoint (due 10/9)
In the **Data** section of the lab, you were introduced to the baseline public score produced by `gender_submission.csv`. **In the first week, your assignment is to beat the public score of that algorithm.** In other words, the first half of this lab will entail the initial construction of your algorithm and your optimization of that algorithm to predict survival better than one that only accounts for gender.

### Checkpoint Scoring
The breakdown for the scores you may receive are as follows:
- **2 pts:** You have submitted predictions by an algorithm that beats the baseline public score.
- **1 pt:** You have submitted predictions by an algorithm, but it does not beat the baseline public score.
- **0 pts:** You did not submit anything.

### Checkpoint Submission
To submit the checkpoint, you will submit the following:
- **Kaggle:** Upload the `.csv` file with your predictions and confirm that you appear on the leaderboard.
- **Gradescope:** Submit a screenshot of your team's name, rank, and % accuracy from the leaderboard to Gradescope. The assignment will be called "Lab 5a: Baseline Checkpoint". **Include ALL members of your group in Gradescope.** While one person needs to submit for your whole group, it is vital that you include all members in your group in Gradescope.

## Optimization (due 10/16)
Once you have completed the baseline requirement, you will turn to perfecting your model. **In the second week, your assignment is to optimize your model such that you are in the top 70% of either the public or private leaderboard.** In other words, the "competitive" aspect of the lab takes place in the second week, and you should dedicate yourself to discovering better ways to refine your model.

### Optimization Scoring
The breakdown for the scores you may receive are as follows:
- **18 pts:** The predictions from your algorithm rank your group in the top 70% of the class, either in the public or private leaderboard.
- **15 pts:** The predictions from your algorithm do not rank your group in the top 70% of the class, either in the public or private leaderboard, but your predictions do beat the baseline.
- **TA Discretion:** The predictions from your algorithm do not rank your group in the top 70% of the class, either in the public or private leaderboard, and your predictions do not beat the baseline.
- **0 pts:** You did not submit anything.

There will also be an opportunity for **extra credit**:
- **+4 pts EC:** Your team ranks amongst the top five (rank 1-5) on the private leaderboard, and at least one member of your group presents your group's approach to the project.
- **+2 pts EC:** Your team ranks amongst the next five (rank 6-10) on the private leaderboard, and at least one member of your group presents your group's approach to the project.

### Optimization Submission
To submit the optimization part, you will submit the following:
- **Kaggle:** Upload the `.csv` file with your predictions and confirm that you appear on the leaderboard. Your rank on the public and private leaderboards will be accessed by the TA team for grading.
- **Gradescope:** Upload all files you used for your algorithm to Gradescope, ideally in a `.zip` file. The assignment will be called "Lab 5b: Code for Kaggle Project". **Include ALL members of your group in Gradescope.** While one person needs to submit for your whole group, it is vital that you include all members in your group in Gradescope. This is also a mandatory prerequisite to be considered for the extra credit.