Archive for clouds

Metropolis in 95 characters

Posted in pictures, R, Statistics, Travel with tags , , , , , , , , on January 2, 2020 by xi'an

Here is an R function that produces a Metropolis-Hastings sample for the univariate log-target f when the later is defined outside as another function. And when using a Gaussian random walk with scale one as proposal. (Inspired from a X validated question.)

m<-function(T,y=rnorm(1))ifelse(rep(T>1,T),
  c(y*{f({z<-m(T-1)}[1])-f(y+z[1])<rexp(1)}+z[1],z),y)

The function is definitely not optimal, crashes for values of T larger than 580 (unless one modifies the stack size), and operates the most basic version of a Metropolis-Hastings algorithm. But as a codegolf challenge (on a late plane ride), this was a fun exercise.

start of 2020

Posted in Kids, Mountains, pictures, Travel with tags , , , , , on January 1, 2020 by xi'an

email footprint

Posted in Travel, University life with tags , , , , , on September 14, 2019 by xi'an

While I was wondering (im Salzburg) at the carbon impact of sending emails with an endless cascade of the past history of exchanges and replies, I found this (rather rudimentary) assessment  that, while standard emails had an average impact of 4g, those with long attachments could cost 50g, quoting from Burners-Lee, leading to the fairly astounding figure of an evaluated impact of 1.6 kg a day or more than half a ton per year! Quite amazing when considering that a round flight Paris-Birmingham is producing 80kg. Hence justifying a posteriori my habit of removing earlier emails when replying to them. (It takes little effort to do so, especially in mailers where this feature can be set as the default option.)

 

Salzburg castle [jatp]

Posted in Mountains, pictures, Travel with tags , , , , , , on September 9, 2019 by xi'an

another Nice shot [jatp]

Posted in Statistics with tags , , , , , , , on May 22, 2019 by xi'an