Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update _config.yml #23

Open
wants to merge 85 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
0784772
Update _config.yml
TinoMargely Feb 9, 2019
8964af5
Update _variables.scss
TinoMargely Feb 9, 2019
e0d2d86
Update and rename 2016-03-06-Eternal-Lorem-Ipsum.md to 2019-02-09-A-N…
TinoMargely Feb 9, 2019
5efa324
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
24976bd
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
7b94147
Update about.md
TinoMargely Feb 9, 2019
fdf0ae3
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
bbb2132
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
3880b45
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
5e23c66
Add files via upload
TinoMargely Feb 9, 2019
4a437a6
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
dbb38ad
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
04c1ef1
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
11d03c3
Fin Article
TinoMargely Feb 9, 2019
0accea1
Update _config.yml
TinoMargely Feb 9, 2019
d9fa98d
Update _config.yml
TinoMargely Feb 9, 2019
066170c
Update about.md
TinoMargely Feb 9, 2019
3adff63
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
cb9e473
Update _config.yml
TinoMargely Feb 9, 2019
19c6028
Update _config.yml
TinoMargely Feb 9, 2019
8eefeb4
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
846035d
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
9f7f840
Update _config.yml
TinoMargely Feb 9, 2019
68497bd
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
a1f4232
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
f0a635e
Update _config.yml
TinoMargely Feb 9, 2019
e79e06c
Update _config.yml
TinoMargely Feb 9, 2019
e894851
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
fc415f2
Update _config.yml
TinoMargely Feb 9, 2019
2ddbf9e
Update _config.yml
TinoMargely Feb 9, 2019
03dea38
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
64dc6e3
Update _highlights.scss
TinoMargely Feb 9, 2019
91f3ea4
Update _highlights.scss
TinoMargely Feb 9, 2019
c120728
Update _highlights.scss
TinoMargely Feb 9, 2019
bc8cb1c
Update _highlights.scss
TinoMargely Feb 9, 2019
a73a92e
Update _highlights.scss
TinoMargely Feb 9, 2019
18f1a68
Update _highlights.scss
TinoMargely Feb 9, 2019
72f484c
Update _highlights.scss
TinoMargely Feb 9, 2019
4f5a2fb
Update _highlights.scss
TinoMargely Feb 9, 2019
20be4cd
Update 2019-02-09-A-Numpy-Approach-To-The-Minty-Hall-Project.md
TinoMargely Feb 9, 2019
35de043
Update _config.yml
TinoMargely Feb 9, 2019
f87ccfa
Delete avatar.jpg
TinoMargely Feb 9, 2019
9b9a2cc
Add files via upload
TinoMargely Feb 9, 2019
101d489
Update _variables.scss
TinoMargely Feb 9, 2019
44e374a
Add files via upload
TinoMargely Feb 10, 2019
88d2a64
Update about.md
TinoMargely Feb 11, 2019
4168c6f
Update projects.md
TinoMargely Jun 15, 2019
1c2163e
Add files via upload
TinoMargely Jun 15, 2019
cf36b67
Create 019-02-09-Birthday-cards-problem.md
TinoMargely Jun 15, 2019
4ef1261
Update and rename 019-02-09-Birthday-cards-problem.md to 2019-06-15-B…
TinoMargely Jun 15, 2019
9002317
Update 2019-06-15-Birthday-cards-problem.md
TinoMargely Jun 15, 2019
32c09dc
Titanic 3
TinoMargely Jun 17, 2019
3f0c105
Changé le titre
TinoMargely Jun 17, 2019
6497092
Avatar
TinoMargely Aug 19, 2019
1860e9d
Changé la pdp
TinoMargely Aug 19, 2019
fe594e7
Changé la pdp de nouveau
TinoMargely Aug 19, 2019
2c79ecc
Changé la pdp de nouveau
TinoMargely Aug 19, 2019
828bca7
Changé la pdp de nouveau encore une fois
TinoMargely Aug 19, 2019
8414054
Changé la pdp de nouveau encore une fois lol
TinoMargely Aug 19, 2019
72726f9
Changé la pdp de nouveau encore une fois lol putain c'est long
TinoMargely Aug 19, 2019
c97f05a
Changé la pdp de nouveau encore une fois lol putain c'est long mais c…
TinoMargely Aug 19, 2019
9aff8f5
Importation de l'article Titanic
TinoMargely Aug 19, 2019
3a28691
Changé le titre
TinoMargely Aug 19, 2019
e99b398
Changé deux trois trucs sur la forme des articles
TinoMargely Aug 19, 2019
3397453
Changé les photos de place, modifié du texte
TinoMargely Aug 19, 2019
1a0b899
Supprimé un doublon
TinoMargely Aug 19, 2019
3bcf149
Essayé d'ajouter les images
TinoMargely Aug 19, 2019
5539350
Enlevé une box de merde
TinoMargely Aug 19, 2019
257b4f7
Changé le project.md
TinoMargely Aug 19, 2019
9b0eba4
Changé le birthday cards problem
TinoMargely Aug 19, 2019
c221874
Changé le birthday cards problem, fix le bug
TinoMargely Aug 19, 2019
ddb6a36
Add files via upload
TinoMargely Dec 10, 2019
1303633
Add files via upload
TinoMargely Dec 10, 2019
c8b09c7
Update 2019-12-10-Recreating_the-Quick_Draw_Neural_Net_using_CNN.md
TinoMargely Dec 10, 2019
9bd43b2
Update 2019-12-10-Recreating_the-Quick_Draw_Neural_Net_using_CNN.md
TinoMargely Dec 10, 2019
ac2dfb8
Update 2019-12-10-Recreating_the-Quick_Draw_Neural_Net_using_CNN.md
TinoMargely Dec 10, 2019
0cc9f15
Rename 2019-12-10-Recreating_the-Quick_Draw_Neural_Net_using_CNN.md t…
TinoMargely Dec 10, 2019
9666daa
Update 2019-12-10-Quick-Draw.md
TinoMargely Dec 10, 2019
3395175
Update 2019-12-10-Quick-Draw.md
TinoMargely Dec 10, 2019
6c3530c
Update 2019-12-10-Quick-Draw.md
TinoMargely Dec 10, 2019
27c0636
Update 2019-12-10-Quick-Draw.md
TinoMargely Dec 10, 2019
cc8c312
Update 2019-12-10-Quick-Draw.md
TinoMargely Dec 10, 2019
ec43d5d
Update and rename 2019-12-10-Quick-Draw.md to 2019-10-12-Quick-Draw.md
TinoMargely Dec 10, 2019
9dac94b
Update 2019-10-12-Quick-Draw.md
TinoMargely Dec 10, 2019
1245da5
Update 2019-10-12-Quick-Draw.md
TinoMargely Dec 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#

# Name of your site (displayed in the header)
name: Your Username
name: Tino Margely

# Short bio or description (displayed in the header)
description: Programmer From Somewhere On Earth
description: Aspiring Data Scientist from France.


#
Expand All @@ -16,12 +16,12 @@ description: Programmer From Somewhere On Earth
# Includes an icon in the footer for each username you enter
footer-links:
dribbble:
email: agarwal.akshay.akshay8@gmail.com
email: tinomargely@gmail.com
facebook:
flickr:
github: AkshayAgarwal007
instagram:
linkedin: akshay-agarwal-782018a4
github: TinoMargely
instagram: tinomargely
linkedin:
pinterest:
rss: # just type anything here for a working RSS icon
twitter:
Expand Down Expand Up @@ -78,4 +78,4 @@ exclude:
- Gemfile.lock
- LICENSE
- README.md
- CNAME
- CNAME
15 changes: 0 additions & 15 deletions _posts/2016-03-06-Eternal-Lorem-Ipsum.md

This file was deleted.

15 changes: 0 additions & 15 deletions _posts/2016-03-08-Eternal-Lorem-Ipsum.md

This file was deleted.

63 changes: 63 additions & 0 deletions _posts/2019-02-09-A-Numpy-Approach-To-The-Monty-Hall-Project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
layout: post
title: A Numpy approach to the Monty Hall problem
author: Tino Margely
---
This was my very first Data Science Project, it is an exercise from the “OpenClassroom” e-learning platform. We first started to approach the Monty Hall problem using only python list and functions. The objective of this exercise was to understand the potential and efficiency of Numpy over simple Python lists.

## My first Data Science project
-----

### The Monty Hall problem
> " The Monty Hall problem is a brain teaser, in the form of a probability puzzle, loosely based on the American television game show Let's Make a Deal and named after its original host, Monty Hall. The problem was originally posed (and solved) in a letter by Steve Selvin to the American Statistician in 1975 (Selvin 1975a), (Selvin 1975b). It became famous as a question from a reader's letter quoted in Marilyn vos Savant's "Ask Marilyn" column in Parade magazine in 1990 (vos Savant 1990a):
> Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice? ", (Wikipedia).

### Model the problem with Numpy
To model this problem I first started by importing all the libraries needed and created two Numpy arrays. We will give to each door a different number, from 0 to 2. The first array called choix_joueur (Player's choice) picks up a random number between zero and two and represents a randomly chosen door for the player. The second array, called bonne_porte (Winning door), represents the door hiding the car. We also introduce a variable "n" representing the number of games we want to simulate.

```python
import matplotlib.pyplot as plt
import numpy as np
from math import *
n=100000

choix_joueur = np.random.randint(0,3,n)
bonne_porte = np.random.randint(0,3,n)
```
We stock the results of the experience in two Numpy arrays: garder / changer (Keep /Change). If you decide to keep the first door you picked, you only win when your first choice is the same as the door randomly picked (seems obvious I know). On the contrary, if you decide to change your choice, picking the good door is the only way you can lose. To explain briefly, just imagine you picked one of the two wrong doors: the host reveals a goat behind one of the two doors left. Then, final door is the one behind which the car is hiding, and as you change the door you picked first you win it! In terms of Numpy arrays, this can be illustrated like following:
```python
garder = bonne_porte[bonne_porte == choix_joueur]
changer = bonne_porte[choix_joueur != bonne_porte]
```
### Results

In order to get some intuitive results, I decided to give 1 point to a player every time he wins the game and plotted the number of wins for each strategy. First, by playing 100,000 games and then I compared the number of wins for each strategy depending on the number of games played.

```python
samples = [1000, 10000, 20000, 50000, 80000, 100000]

def play_game(n):
choix_joueur = np.random.randint(0,3,n)
bonne_porte = np.random.randint(0,3,n)
garder = bonne_porte[bonne_porte == choix_joueur]
changer = bonne_porte[choix_joueur != bonne_porte]

return [garder.size, changer.size]


#Affichage des résultats

fig,(ax1,ax2) = plt.subplots(2,1,figsize=(5,8),dpi=100,num=2,sharey=True)

ax1.bar(['Garder','Changer'], play_game(100000), color=['r','g'])
ax1.set_title('Gains des joueurs sur 100 000 parties')

ax2.set_title("Gain des joueurs en fonction du nombre de parties")
ax2.scatter(samples, [play_game(i)[0] for i in samples],c='r')
ax2.scatter(samples, [play_game(i)[1] for i in samples], c='g')
```
##### And here are the results :

![alt text](/images/result.png "Logo Title Text 1")

##### In the end, it is clear that the best strategy is to change the door from your first choice if you want to win the car !
6 changes: 6 additions & 0 deletions _posts/2019-06-15-Birthday-cards-problem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: post
title: A birthday cards problem
author: Tino Margely
---
To be written
Loading