RSSAmplifier

Blog

Bas Jacobs

My blog about math, programming and data science

basjacobs.comRSS feed ↗20 posts

Latest posts

MNIST-1D: From logistic regression to ROCKET

MNIST-1D ( Greydanus & Steinbach, 2020 ) is a procedurally generated dataset that contains 1D-representations of the digits in the MNIST dataset. Here we try to fit some simple models on it and see if we can do well without neural networks. First, let’s load it and look at some examples. import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LogisticRegression from…

Kanji components

I made a small website where you can browse kanji and visualize their radicals and phonetic components. You can search for kanji or component. The website is here: basjacobs93.github.io/kanji-phonetic-components , and source code is here: github.com/basjacobs93/kanji-phonetic-components . Screenshot of the kanji components website

Roelf (in Dutch)

In de podcast “We Love Nederlands” vertelt Yannick waaorm hij de naam Roelf zo mooi vindt. Volgens hem kan je elke letter weghalen en blijft er telkens weer een bestaande naam over. Haal je de f weg, krijg je Roel , haal je de l weg, krijg je Roef , et cetera. Haal je de R weg, krijg je Oelf , weer een naam. Helaas is volgens de Nederlandse Voornamenbank van het Meertens Instituut Oelf geen…

WK-NHK

I created a website www.wk-nhk.com that shows NHK Web Easy articles with custom furigana based on WaniKani level. I try to read a couple of NHK Easy articles each day, but I found that even though I know some of the kanji, my eyes read the furigana anyways. That feels like cheating and it does not force me to practice the kanji. In this new website, you can select your WaniKani level with the…

Japanese Learning Helper for Safari

I vibe-coded a Safari extension that helps me practice Japanese while I am browsing the web. Find it here . It connects to WaniKani to translate words of your level. It can translate a fixed set of nouns, all your WaniKani words, or full sentences. You can select the percentage of sentences it should translate. It is still a bit buggy, but it works for me. It is fun how easy it now is to create…

Short-toed Treecreepers Article

The paper called Factors influencing roost use by Short-toed Treecreepers Certhia brachydactyla at urban sites , has been published . The most work was done by Dook who put in a lot of effort to create this great dataset, and Paul who did research and wrote the article. I am really happy and proud that I was able to assist with the statistics and graphs.

Neurogram

Find in this repository an implementation of the CPPN-NEAT algorithm to create networks that represent images. I tried to keep things simple and lightweight, using only matplotlib as a dependency for drawing the images. The dependency networkx was added for drawing the networks for debugging purposes. The networks themselves are simple Python objects. 6 networks (and hence images) are generated at…

Dutch placename mapper

Inspired by British Placename Mapper , I thought I’d try to make such place name visualizations of the Netherlands myself. The Dutch platform PDOK provides open geo-information datasets through webservices and downloads. Here, we use the location API to search for residence locations using Solr-syntax . We also use the gray background map from PDOK, and use leaflet to create interactive maps.…

Physics-informed neural network for population dynamics

A Physics-Informed Neural Network (PINN) is a neural network that incorporates knowledge about physical laws alongside data. These physical (or chemical, or biological) laws can be incorporated into the network in the form of differential equations. Among other things, PINNs can be used to estimate parameters of a differential equation based on observational data. Last week, Dr. Riccardo Taormina…

Riddler: Nonconformist Dice

Last week’s Riddler Classic is a question about rolling tetrahedral dice: You have four fair tetrahedral dice whose four sides are numbered 1 through 4. You play a game in which you roll them all and divide them into two groups: those whose values are unique, and those which are duplicates. For example, if you roll a 1, 2, 2 and 4, then the 1 and 4 will go into the “unique” group, while the 2s…

Riddler: Another Hunt For Mysterious Numbers

This week’s FiveThirtyEight Riddler Express is similar to the Riddler Classic of two weeks ago: By all accounts, Riddler Nation had a lot of fun hunting for the mysterious numbers a few weeks back. So here’s what we’re going to do: For the next four weeks, the Riddler Express will feature a similar puzzle that combines multiplication and logic. We’ll be calling these CrossProducts. For your first…

Riddler: Can You Hunt For The Mysterious Numbers?

This week’s FiveThirtyEight Riddler Classic offers a sudoku-like puzzle: There are eight three-digit numbers — each belongs in a row of the table below, with one digit per cell. The products of the three digits of each number are shown in the rightmost column. Meanwhile, the products of the digits in the hundreds, tens, and ones places, respectively, are shown in the bottom row. Can you find all…

EleksDraw pen plotter with R

The EleksDraw pen plotter is a relatively cheap pen plotter that works like the better-known AxiDraw plotter. Unlike the AxiDraw, it comes as a kit that needs to be assembled, and the only software available is a Windows program. Since I’m using macOS and I wanted more freedom, I decided to fiddle around with it in Python, which resulted in a blog post and accompanying code . In this post, I…

Image Triangulation with Julia

I have always been fascinated by computer generated art. Recently, I came across the paper Stylized Image Triangulation by Kai Lawonn and Tobias Günther. In this paper, the authors perform image triangulation (approximating an image by tessellation with triangles) by coming up with an initial grid and performing gradient descent. They achieve beautiful triangulations that capture the original…

Riddler: Can You Eat All The Chocolates?

Today’s 538 Riddler Classic is about eating chocolates: I have 10 chocolates in a bag: Two are milk chocolate, while the other eight are dark chocolate. One at a time, I randomly pull chocolates from the bag and eat them — that is, until I pick a chocolate of the other kind. When I get to the other type of chocolate, I put it back in the bag and start drawing again with the remaining chocolates. I…

Trees and Tents

Trees and Tents is a logic game in which tents need to be placed in a grid. Every tent must be next to a tree, and tents cannot touch horizontally, vertically or diagonally. For every row and column, the number of tents is given. The website https://brainbashers.com/tents.asp posts a new puzzle every day, of which a 12x12 example is the following: A 12x12 Trees and Tents puzzle from…

Showing images on hover in Plotly with R

For a project I was working on recently, I wanted to turn a ggplot scatterplot into an interactive visualisation: when hovering over a point, a corresponding image needed to be shown. I did not want to use Shiny, since I required the visualisation to be portable. This is possible by manually tinkering with html , but using the plotly and htmlwidgets packages, I was able to achieve what I wanted…

Learning image representation with Keras in R

An image can be viewed as a function mapping pixel locations to color values . Since neural networks are function approximators, we can train such a network to approximate an image. The network is then a representation of the image as a function and its contents can be displayed by evaluating the network for all pixel pairs . The Keras package for R is now approximately 1 year old but I have to…

Generating the logo for this site

I wanted a logo for my blog. Something kind of personal, but abstract; preferably something that could be drawn with a single path. I decided to download an elevation map of the Netherlands (where I live) to somehow use a plot of that data as my logo. I thought it would be nice to generate a side view and smooth it. In this short post I will discuss how I did it. The data The Netherlands have an…

Pen plotter

Inspired by this blog post, I got interested in pen plotters and computer generated art. I liked the minimalist pieces of art a plotter could create, resembling a human hand doodling on a piece of paper. A lot of examples of this art can be found on Twitter at #plottertwitter . By far the most used plotter on Twitter is the AxiDraw , but since I didn’t want to spend over 400 euros and I liked the…