Boring machine learning is where it’s at

go grab a spreadsheet and figure out how to get the best result on a boring economics problem with a boring algorithm; Don’t worry so much about making a painting or movie with GANs, we’re already really good at doing that and enjoy doing it.

Store git credentials for a day from the command line. As of Aug, 2021, a ‘personal access token’ must replace your password.

git config --global credential.helper "cache --timeout=86400"

via https://stackoverflow.com/a/5343146/992999

Python decorators

I finally understand Python decorators!

def bread(func):
    def wrapper():
        print("</''''''\>")
        func()
        print("<\______/>")
    return wrapper

def ingredients(func):
    def wrapper():
        print("#tomatoes#")
        func()
        print("~salad~")
    return wrapper

def sandwich(food="--ham--"):
    print(food)

Without a decorator

sandwich()
#outputs: --ham--
sandwich = bread(ingredients(sandwich))
sandwich()
#outputs:
#</''''''\>
# #tomatoes#
# --ham--
# ~salad~
#<\______/>

Using the Python decorator syntax:

@bread
@ingredients
def sandwich(food="--ham--"):
    print(food)

sandwich()
#outputs:
#</''''''\>
# #tomatoes#
# --ham--
# ~salad~
#<\______/>

Link list of programming tips

Link list of programming tips

A crowd-sourced list of recommendations for learning good programming style from the lab group.

iA Writer to micro.blog

I just discovered that iA Writer publishes to micro.blog. How cool! Am going to see if I can use this to improve my writing habits as per Andrew Gelman's recent comment:

Eventually everything makes its way from conversation to blog to publication.

A great philosophy.

Far from being an aberration, Dominic Raab might be the right man for the job – an out-of-office foreign secretary for an out-of-office country.

Via Marina Hyde

… working through the logical implications of our assumptions

What’s the purpose of mathematical modeling? « Statistical Modeling, Causal Inference, and Social Science

Scientists — not just in epidemiology, but in physics, ecology, climatology, economics and every other field — don’t build models as oracles of the future. For them, a model “is just a way of understanding a particular process or a particular question we’re interested in,” Kucharski said, “and working through the logical implications of our assumptions.”

Machine learning toolkit in the browser from a single docker image.

docker run -p 8080:8080 mltooling/ml-workspace:0.12.1

Today I learned that to access netrw (Vim’s inbuilt file browser) I need to call :Explore.

dalex.drwhy.ai

On a mission to responsibly build machine learning predictive models

Git submodules

Maybe the nicest explanation I’ve read so far. But then, they should know!

By harnessing randomness, a new algorithm achieves a fundamentally novel — and faster — way of performing one of the most basic computations in math and computer science.

Not just a cool scientific advance, but a very cool explanation of a new technique. For that matter, a lovely explanation of matrix multiplication for the non-mathematician.

New Algorithm Breaks Speed Limit for Solving Linear Equations By harnessing randomness, a new algorithm achieves a fundamentally novel — and faster — way of performing one of the most basic computations in math and computer science.

Quanta Magazine quantamagazine.org

Karl Broman

What a cool set of resources including notes on R, make and more!

Reflow a comment in Vim

Visually select the text then gq

Getting Ofelia to work

I followed and modified the instructions here. This was much easier than trying to make do with the readme.

The key insight here is that you need to leave something running in the foreground.

How do I keep Docker containers running in the background? If you would like to keep your container running in detached mode, you need to run something in the foreground. An easy way to do this is to tail the /dev/null device as the CMD or ENTRYPOINT command of your Docker image. This command could also run as the last step in a custom script used with CMD or ENTRYPOINT .

via source

Vim tips: file name completion? (triggered with <c-x><c-f>)

A brief tutorial on decision curve analysis

A simple, step-by-step guide to interpreting decision curve analysis

50 Years of Data Science …

50 Years of Data Science: Journal of Computational and Graphical Statistics: Vol 26, No 4:

This paper is a great find. Not the least because the argument (statistics versus data science) was already in full swing 50 years ago.

I have no problem with predictive modelling, but it is a different task. And it does seem that the emphasis on ML has obscured the value (in a pendulum swing from the days of Tukey) on importance of understanding the generative model. From Donoho …

Predictive modeling is effectively silent about the underlying mechanism generating the data, and allows for many different predictive algorithms, preferring to discuss only accuracy of prediction made by different algorithm on various datasets. The relatively recent discipline of machine learning, often sitting within computer science departments, is identified by Breiman as the epicenter of the predictive modeling culture.

I like to think that our lab is pulling hard at the pendulum. That we care massively about the underlying mechanism. That for me is the ‘science’ in ‘data science’. Science because when right it tells us something about how the world works, not just how it will be. The difference between a super accurate weather forecast, and understanding the principles of the atmosphere and the climate. None of that devalues predictive modelling, but these are separate activities.

Science Isn’t Broken | FiveThirtyEight

That variation [in results] occurs because science is hard.

Two photo-essays from work

I cry a lot on the train home’: London medics fight to save Covid patients

A baptism of fire’: medical volunteers at a Covid ICU – photo essay