Skip to content

Commit

Permalink
Merge pull request #17 from Ipsit1234/grader_for_titanic
Browse files Browse the repository at this point in the history
Grader for titanic
  • Loading branch information
Aakriti28 authored Oct 12, 2020
2 parents 7a79159 + c3981ab commit 9f71513
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/Hello-FOSS-ML.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,17 @@ You can choose to do one or more of the following tasks -
* [Random Forests](./Titanic%20Random%20Forest%20Tensorflow.ipynb)
* [K-Nearest Neighbours](./Titanic%20KNN%20Tensorflow.ipynb)
* [Gaussian Naive Bayes model](./Titanic%20GaussianNB%20Tensorflow.ipynb)

### Validating Your Predictions
You can check your predictions by saving them as a `csv` file in the same directory
as that of `output.csv` and running the following in the terminal
```bash
~$ python grader.py --path <your_predictions>
```
For example,
```bash
~$ python grader.py --path gender_submission.csv
Your accuracy is 76.56%
```
# 2) MNIST and Fashion MNIST

**MNIST** ("Modified National Institute of Standards and Technology") is the de facto “hello world” dataset of computer vision. Since its release in 1999, this classic dataset of handwritten images has served as the basis for benchmarking classification algorithms. As new machine learning techniques emerge, MNIST remains a reliable resource for researchers and learners alike. In fact, MNIST is often the first dataset researchers try. "If it doesn't work on MNIST, it won't work at all", they said. "Well, if it does work on MNIST, it may still fail on others."
Expand Down
15 changes: 15 additions & 0 deletions titanic/grader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import pandas as pd
import argparse
import os

def grade():
parser = argparse.ArgumentParser()
parser.add_argument("--path", help="Give the path of the file to be graded")
args = parser.parse_args()
data_to_be_graded = pd.read_csv(os.path.join(os.getcwd(), args.path))
expected = pd.read_csv('./output.csv')
accuracy = sum(expected['Survived'].values == data_to_be_graded['Survived'].values) / len(expected)
print("Your accuracy is {}%".format(round(accuracy * 100, 2)))

if __name__ == '__main__':
grade()
File renamed without changes.

0 comments on commit 9f71513

Please sign in to comment.