Publications by Edwin Grappin
Generation of a normal distribution from "scratch" – The box-muller method
My previous post is about a method to simulate a Brownian motion. A friend of mine emailed me yesterday to tell me that this is useless if we do not know how to simulate a normally distributed variable. My first remark is: use the rnorm() function if the quality of your simulation is not too important (Later, I’ll try to explain you why the R �...
2402 sym 2 img
How to choose your next holidays destination – Uniform distribution on a sphere
If you want to choose randomly your next holidays destination, you are likely to process in a way which is certainly biased. Especially if you choose randomly the latitude and the longitude. A bit like they do in this lovely advertising (For those of you who do not speak French, this is about a couple who have won the national gamble prize and ha...
5409 sym 6 img 3 tbl
Want to win "Guess who?" – Have an institutional neural network approach
Have you ever played the board game “Guess who?”. For those who have not experienced childhood (because it might be the only reason to ignore this board game), this is a game consisting in trying to guess who the opponent player is thinking of among a list of characters – we will call the one he chooses the “chosen character...
7468 sym 6 img 2 tbl
Function apply() – Tip 1
The function apply() is certainly one of the most useful function. I was scared of it during a while and refused to use it. But it makes the code so much faster to write and so efficient that we can’t afford not using it. If you are like me, that you refuse to use apply because it is scary, read the following lines, it will help...
3871 sym 2 img
Have you tried to understand your network? – Random generation of network models
I already talked about networks a few times in this blog. In particular, I had this approach to explain spatial segregation in a city or to solve the Guess Who? problem. However, one of the question is how to generate a good network. Indeed, I aim to study strategy to split a network, but I need first to work with a realistic neural n...
6883 sym 10 img
How to plot a network (package network) – Tip 2
As you have certainly seen now, I like working on artificial neural networks. I have written a few posts about models with neural networks (Models to generate networks, Want to win to Guess Who and Study of spatial segregation).Unfortunately, I missed so far a nice and pleasant aspect of networks : its graphical approach. Indeed, plot...
4020 sym 4 img
Temporal network model – Barabási-Albert model with the library igraph
I found a golden website. The blog of Esteban Moro. He uses R to work on networks. In particular he has done a really nice code to make some great videos of networks. This post is purely a copy of his code. I just changed a few arguments to change colors and to do my own network.To create the network, I used the Barabási-Albert al...
2549 sym
Pricing of a financial product : A pricer of a call option.
The financial market is not only made of stock options. Other financial products enable market actors to target specific aims. For example, an oil buyer like a flight company may want to cover the risk of increase in the price of oil. In this case it is possible to buy on the financial market what is known as a “Call” or a “Call...
3461 sym 2 img