Blog posts by Tag

Back to default view

 


#Buddhism (4)

Visualizing Occam's Razor through machine learning

posted:
Here, we illustrate the concept of Occam’s Razor, a principle advocating for simplicity, by examining its manifestation in the domain of machine learning using Python.

Zen and natural sciences

posted: updated:
In this post, I broaden the scope and explore the intersections of Zen and natural sciences more generally.

The Zen of Python

posted:
The connection between Zen and programming is not a subjective one at all. For instance, Python has built it directly into its core programming, known as The Zen of Python.

The Zen of programming

posted:
Some thoughts about the connections between Zen and programming.

#Cheat Sheets (12)

Hacks and extensions to improve your coding with Visual Studio Code

posted: updated:
This curated list contains useful hacks and extensions to improve the overall coding performance with Visual Studio Code (VS Code).

New Teaching Material: Python Cheat Sheets

posted:
I’ve started a collection of various Python cheat sheets that contain some useful and commonly used commands and usage examples.

Dealing with future posts in Jekyll

posted: updated:
While drafting blog posts in Jekyll, you may want to keep some posts hidden from the public eye until they’re ready to be published. In the world of blogging with Jekyll, there are several effective methods to draft such posts without immediately publishing them. Here are three practical approaches.

Running and testing your Jekyll site locally with custom options

posted: updated:
Developing with Jekyll often requires running your site locally to test changes before deploying them live. Here is a handy yet useful one-line command that I usually use to run my Jekyll site locally with custom options.

Emojis for Jekyll via Jemoji

posted:
A how-to and a list of all currently working Emojis on Jekyll built websites.

strftime Cheat Sheet

posted: updated:
Cheat Sheet on formatted date and time strings used, e.g., in Python, C/C++ or even on Jekyll websites by using Liquid tags.

Liquid Cheat Sheet

posted:
This Cheat Sheet gives an overview of Liquid syntax commands one might encounter while developing a Jekyll website.

Minimal Mistakes Cheat Sheet

posted: updated:
A quick overview of available commands for creating content with the Minimal Mistakes Jekyll theme.

Supported syntax highlighting in Jekyll

posted:
A list of supported programming languages for Jekyll’s syntax highlighting.

How to use LaTeX in Markdown

posted:
A quick guide on how to enable MathJax support in your Markdown documents.

New Teaching Material: LaTeX Guide

posted: updated:
I’ve added a LaTeX guide to the General Teaching Materials in the teaching section. It serves as a Getting started with LaTeX guide and as a LaTeX glossary.

New Teaching Material: Markdown Guide

posted: updated:
I’ve composed a Markdown Guide for my teaching courses.

#Computational Science (8)

Building a neural network from scratch using NumPy

posted:
Ever thought about building you own neural network from scratch by simply using NumPy? In this post, we will do exactly that. We will build, from scratch, a simple feedforward neural network and train it on the MNIST dataset.

The Integrate and Fire Model: A simple neuronal model

posted:
In this post we explore the Integrate-and-Fire model, a simplified representation of a neuron. We also run some simulations in Python to understand the model dynamics.

The Lotka-Volterra equations: Modeling predator-prey dynamics

posted: updated:
The Lotka-Volterra system, also known as the predator-prey equations, is a mathematical model that describes the interaction between two species: predators and their prey. The system captures the dynamic relationship between the population sizes of predators and prey over time, highlighting the intricate balance between them. In this post we explore this system and calculate its numerical solution using numerical integration Python.

The SIR model: A mathematical approach to epidemic dynamics

posted: updated:
In the wake of the COVID-19 pandemic, epidemiological models have garnered significant attention for their ability to provide insights into the spread and control of infectious diseases. One such model is the SIR model, forming the foundation for studying the dynamics of epidemics. In this blog post, we delve into the details of the SIR model, providing a mathematical description, and showcasing its application through a Python simulation.

The two-body problem

posted: updated:
The two-body system is a classical problem in physics. It describes the motion of two massive objects that are influenced by their mutual gravitational attraction. The two-body problem is a special case of the n-body problem, which describes the motion of two objects that are influenced by their mutual gravitational attraction. In this post, we make use of Runge-Kutta methods to solve the according equations of motion and simulate the trajectories of artificial satellites around the Earth.

Solving the Lorenz system using Runge-Kutta methods

posted: updated:
In my previous post, I introduced the Runge-Kutta methods for numerically solving ordinary differential equations (ODEs), that are challenging to solve analytically. In this post, we apply the Runge-Kutta methods to solve the Lorenz system. The Lorenz system is a set of differential equations known for its chaotic behavior and non-linear dynamics. By utilizing the Runge-Kutta methods, we can effectively simulate and analyze the intricate dynamics of this system.

Runge-Kutta methods for solving ODEs

posted: updated:
In physics and computational mathematics, numerical methods for solving ordinary differential equations (ODEs) are of central importance. Among these, the family of Runge-Kutta methods stands out due to its versatility and robustness. In this post we compare the first four orders of the Runge-Kutta methods, namely RK1 (Euler’s method), RK2, RK3, and RK4.

Earth's dipolar magnetic field

posted: updated:
In physics and computational mathematics, numerical methods for solving ordinary differential equations (ODEs) are of central importance. Among these, the family of Runge-Kutta methods stands out due to its versatility and robustness. In this post we compare the first four orders of the Runge-Kutta methods, namely RK1 (Euler’s method), RK2, RK3, and RK4.

#Data Science (60)

Building a neural network from scratch using NumPy

posted:
Ever thought about building you own neural network from scratch by simply using NumPy? In this post, we will do exactly that. We will build, from scratch, a simple feedforward neural network and train it on the MNIST dataset.

Python's version logos

posted:
Have you ever noticed that Python has introduced individual version logos starting with version 3.10? I couldn’t find any official announcement, but luckily, the Python community on Mastodon was able to help out.

Conditional GANs

posted:
I was wondering whether it would be possible to let GANs generate samples conditioned on a specific input type. I wanted the GAN to generate samples of a specific digit, resembling a personal poor man’s mini DALL•E. And indeed, I found a GAN architecture, that allows what I was looking for: Conditional GANs.

Eliminating the middleman: Direct Wasserstein distance computation in WGANs without discriminator

posted:
We explore an alternative approach to implementing WGANs. Contrasting from the standard implementation that requires both a generator and discriminator, the method discussed here employs the optimal transport to compute the Wasserstein distance directly between the real and generated data distributions, eliminating the need for a discriminator.

Wasserstein GANs

posted:
We apply the Wasserstein distance to Generative Adversarial Networks (GANs) to train them more effectively. We compare a default GAN with a Wasserstein GAN (WGAN) trained on the MNIST dataset and discuss the advantages and disadvantages of both approaches.

Probability distance metrics in machine learning

posted:
Probabilistic distance metrics play a crucial role in a broad range of machine learning tasks, including clustering, classification, and information retrieval. The choice of metric is often determined by the specific requirements of the task at hand, with each having unique strengths and characteristics. In this post, we discuss five commonly used metrics: the Wasserstein Distance, the Kullback-Leibler Divergence (KL Divergence), the Jensen-Shannon Divergence (JS Divergence), the Total Variation Distance (TV Distance), and the Bhattacharyya Distance.

Comparing Wasserstein distance, sliced Wasserstein distance, and L2 norm

posted:
In machine learning, especially when dealing with probability distributions or deep generative models, different metrics are used to quantify the ‘distance’ between two distributions. Among these, the Wasserstein distance (EMD), sliced Wasserstein distance (SWD), and the L2 norm, play an important role. Here, we compare these metrics and discuss their advantages and disadvantages.

Approximating the Wasserstein distance with cumulative distribution functions

posted:
In the previous two posts, we’ve discussed the mathematical details of the Wasserstein distance, exploring its formal definition, its computation through linear programming and the Sinkhorn algorithm. In this post, we take a different approach by approximating the Wasserstein distance with cumulative distribution functions (CDF), providing a more intuitive understanding of the metric.

Wasserstein distance via entropy regularization (Sinkhorn algorithm)

posted: updated:
Calculating the Wasserstein distance can be computational costly when using linear programming. The Sinkhorn algorithm provides a computationally efficient method for approximating the Wasserstein distance, making it a practical choice for many applications, especially for large datasets.

Wasserstein distance and optimal transport

posted:
The Wasserstein distance, also known as the Earth Mover’s Distance (EMD), provides a robust and insightful approach for comparing probability distributions and finds application in various fields such as machine learning, data science, image processing, and information theory. In this post, we take a look at the optimal transport problem, required to calculate the Wasserstein distance, and how to calculate the distance metric in Python.

Visualizing Occam's Razor through machine learning

posted:
Here, we illustrate the concept of Occam’s Razor, a principle advocating for simplicity, by examining its manifestation in the domain of machine learning using Python.

Mamba vs. Conda: Unleashing lightning-fast Python package installations

posted: updated:
If you’ve ever experienced the frustration of waiting for ages while installing Python packages with conda, there’s a game-changer I wish I’d heard about earlier: Mamba. This lightning-fast package manager surprised me with its incredible speed, making package installations a breeze. Here is my personal experience and why Mamba is the speed demon you may have been looking for.

Assessing animal behavior with machine learning

posted:
High-throughput and multi-modal behavior experiments, coupled with machine learning analysis, unlock valuable insights into complex systems by capturing diverse behavioral responses and deciphering hidden structures within high-dimensional datasets. I just completed a short introductory lecture on this topic, which is now available in the Teachings section.

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

Using random forests for pixel classification

posted:
Beyond traditional classification problems, random forests have proven their effectiveness in pixel classification. In this post, we will delve into this domain and explore how random forests can be effectively utilized to tackle the task of pixel classification.

Decision Trees vs. Random Forests for classification and regression: A comparison

posted:
Decision trees and random forests are popular machine learning algorithms that are widely used for both classification and regression tasks. In this blog post, we elucidate their theoretical foundations and discuss the differences as well as their advantages and drawbacks.

Image denoising techniques: A comparison of PCA, kernel PCA, autoencoder, and CNN

posted:
In this post, we explore the performance of PCA, Kernel PCA, denoising autoencoder, and CNN for image denoising.

Using Autoencoders to reveal hidden structures in high-dimensional data

posted:
In this Python tutorial, we explore the application of Autoencoders for dimensionality reduction, demonstrating how this powerful technique can help us uncover and interpret hidden patterns within our data.

Unlocking hidden patterns with Factor Analysis

posted:
In this Python tutorial, we dive into Factor Analysis, a powerful statistical method used to uncover hidden, or ‘latent,’ variables within high-dimensional datasets. Like PCA, grasping this technique will allow us to simplify complex data structures, thereby aiding in more effective data interpretation and decision-making.

Untangling complexity: harnessing PCA for data dimensionality reduction

posted:
This tutorial explores the use of Principal Component Analysis (PCA), a powerful tool for reducing the complexity of high-dimensional data. By delving into both the theoretical underpinnings and practical Python applications, we illuminate how PCA can reveal hidden structures within data and make it more manageable for analysis.

t-SNE and PCA: Two powerful tools for data exploration

posted:
Dimensionality reduction techniques play a vital role in both data exploration and visualization. Among these techniques, t-SNE and PCA are widely used and offer valuable insights into complex datasets. In this blog post, we explore te mathematical background of both methods, compare their methodologies, and discuss their advantages and disadvantages. Additionally, we take a look at their practical implementation in Python and compare the results on different sample datasets.

Understanding L1 and L2 regularization in machine learning

posted:
Regularization techniques play a vital role in preventing overfitting and enhancing the generalization capability of machine learning models. Among these techniques, L1 and L2 regularization are widely employed for their effectiveness in controlling model complexity. In this blog post, we explore the concepts of L1 and L2 regularization and provide a practical demonstration in Python.

Understanding gradient descent in machine learning

posted:
Gradient descent is a fundamental optimization algorithm widely used in machine learning for finding the optimal parameters of a model. It is a powerful technique that enables models to learn from data by iteratively adjusting their parameters to minimize a cost or loss function. In this blog post, we explore the mathematical background of this method and showcase its implementation in Python.

Loading and saving files in Google Colab

posted:
Enable I/O support in your notebooks running in Google Colab with just a few additional commands.

Mutual information and its relationship to information entropy

posted:
Mutual information is an essential measure in information theory that quantifies the statistical dependence between two random variables. Given its broad applicability, it has become an invaluable tool in diverse fields like machine learning, neuroscience, signal processing, and more. This post explores the mathematical foundations of mutual information and its relationship to information entropy. We will also demonstrate its implementation in some Python examples.

Information entropy

posted:
A fundamental concept that plays a pivotal role in quantifying the uncertainty or randomness of a set of data is the information entropy. Information entropy provides a measure of the average amount of information or surprise contained in a random variable. In this blog post, we explore its mathematical foundations and demonstrate its implementation in some Python examples.

Understanding entropy

posted:
In physics, entropy is a fundamental concept that plays a crucial role in understanding the behavior of physical systems. It provides a measure of the disorder or randomness within a system, and its study has far-reaching applications across various branches of physics. This blog post aims to provide a brief overview of entropy in order to gain a better understanding of it.

Bio-image registration with Python

posted:
Which method works best for which registration problem? In this tutorial we compare different methods for the registration of bio-images using Python.

How to run PyTorch on the M1 Mac GPU

posted:
As for TensorFlow, it takes only a few steps to enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with PyTorch.

How to run TensorFlow on the M1 Mac GPU

posted:
In just a few steps you can enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with TensorFlow.

Is there a difference between miniconda and miniforge?

posted:
Simply said: not really. Miniconda is the company driven minimal conda installer, while miniforge is its community driven variant. In the end, you’ll get the same minimal conda installation on your machine – with a minor difference.

Hacks and extensions to improve your coding with Visual Studio Code

posted: updated:
This curated list contains useful hacks and extensions to improve the overall coding performance with Visual Studio Code (VS Code).

Setting up Visual Studio Code for Python

posted: updated:
In just a few steps you can turn Visual Studio Code (VS Code) into a powerful Python editor for both pure Python code and Jupyter Notebooks.

Enable interactive plots and other plot modes in Jupyter notebooks

posted:
Learn how to enable interactive, static and stand-alone window plots in Jupyter notebooks with the magic command %matplotlib.

Enable code folding in JupyterLab

posted:
Learn how to enable code folding in JupyterLab for both, Jupyter Notebooks and pure Python scripts.

How to create and apply a requirements.txt file in Python

posted: updated:
Learn how to install Python packages with a requirements.txt file and how to create one yourself.

Virtual environments with venv

posted: updated:
In addition to conda’s create command, Python’s built-in venv command offers another way for creating virtual environments.

Using pip to install Python packages

posted: updated:
pip is another package installer for Python. Learn how to use it for installing and managing Python packages in your projects.

How to install and run Python code from GitHub

posted:
Learn how to install code from GitHub, that is, e.g., not (yet) available via conda or pip.

A minimal Python installation with miniconda

posted: updated:
Learn how to install miniconda to have a quick and minimal Python installation on any operating system. Also learn how to use conda to create and manage virtual environments, install packages, run Python scripts and run Jupyter Notebooks and JupyterLab.

Stable installation of Napari on a M1 Mac

posted:
In case you’re having problems installing Napari on your M1 Mac, try to install it from conda instead of pip.

Open Zarr files in Fiji

posted:
Both Zarr and OME-ZARR files are supported in Fiji. Here’s how to get it working.

Using Zarr for images – The OME-ZARR standard

posted:
As for any other NumPy array, we can use the Zarr file format to store image files. In this post we additionally explore the NGFF (next-generation file format) OME-ZARR standard.

Zarr – or: How to save NumPy arrays

posted: updated:
What is Zarr and why is it probably the most suitable file format for saving NumPy arrays?

How to read patch clamp recordings in WaveMetrics IGOR binary files (ibw) in Python

posted:
This is a mini tutorial on how to read patch clamp recordings in WaveMetrics IGOR binary files (*.ibw) in Python using the neo and igor packages.

How to add statistical annotations to matplotlib plots

posted:
This mini tutorial shows, how to add statistical annotations to matplotlib plots with just a few commands.

Make matplotlib plots look more appealing with just a few extra commands

posted:
Learn how to nice up matplotlib plots with just a few hacks.

Variable Explorer in Jupyter Notebooks

posted:
Extend your Jupyter environment with Notebook Extensions and enable, e.g., the option to explore your currently defined variables in a running Jupyter session.

Opening a Jupyter notebook from GitHub in Binder: A step-by-step guide

posted:
Opening a Jupyter notebook from GitHub in Binder simplifies access to shared code and facilitates seamless collaboration. With just a few steps, you can launch and interact with Jupyter notebooks directly in your browser, without the need for complex setup procedures.

New Teaching Material: Python Cheat Sheets

posted:
I’ve started a collection of various Python cheat sheets that contain some useful and commonly used commands and usage examples.

New Teaching Material: Statistical data analysis and basic time series analysis with Python

posted:
I’ve added two new tutorials in the teaching section on statistical data analysis and basic time series analysis with Python.

New Teaching Material: Analyzing IGOR binary files of patch clamp recordings

posted:
I’ve added a new tutorial in the teaching section on how to read and process IGOR binary files (ibw) of patch clamp recordings.

The Weierstrass function and the beauty of fractals

posted: updated:
Fractals are captivating mathematical objects that exhibit intricate patterns and self-similarity at various scales. In this post, we explore the elegance and significance of the Weierstrass function, its relation to fractals and fractal geometry, and discuss other notable fractals. Through this journey, we will discover the fascinating world of fractal geometry and its beautiful and profound impact.

The Lotka-Volterra equations: Modeling predator-prey dynamics

posted: updated:
The Lotka-Volterra system, also known as the predator-prey equations, is a mathematical model that describes the interaction between two species: predators and their prey. The system captures the dynamic relationship between the population sizes of predators and prey over time, highlighting the intricate balance between them. In this post we explore this system and calculate its numerical solution using numerical integration Python.

Interactive COVID-19 data exploration with Jupyter notebooks

posted: updated:
Amidst the ongoing challenges of the COVID-19 pandemic, I have written a Jupyter notebook that facilitates interactive exploration of COVID-19 data. You can select specific countries and visualize key aspects such as confirmed cases, deaths, and vaccinations. The notebook is openly available on GitHub. Feel free to use and share it.

The SIR model: A mathematical approach to epidemic dynamics

posted: updated:
In the wake of the COVID-19 pandemic, epidemiological models have garnered significant attention for their ability to provide insights into the spread and control of infectious diseases. One such model is the SIR model, forming the foundation for studying the dynamics of epidemics. In this blog post, we delve into the details of the SIR model, providing a mathematical description, and showcasing its application through a Python simulation.

The two-body problem

posted: updated:
The two-body system is a classical problem in physics. It describes the motion of two massive objects that are influenced by their mutual gravitational attraction. The two-body problem is a special case of the n-body problem, which describes the motion of two objects that are influenced by their mutual gravitational attraction. In this post, we make use of Runge-Kutta methods to solve the according equations of motion and simulate the trajectories of artificial satellites around the Earth.

Solving the Lorenz system using Runge-Kutta methods

posted: updated:
In my previous post, I introduced the Runge-Kutta methods for numerically solving ordinary differential equations (ODEs), that are challenging to solve analytically. In this post, we apply the Runge-Kutta methods to solve the Lorenz system. The Lorenz system is a set of differential equations known for its chaotic behavior and non-linear dynamics. By utilizing the Runge-Kutta methods, we can effectively simulate and analyze the intricate dynamics of this system.

Runge-Kutta methods for solving ODEs

posted: updated:
In physics and computational mathematics, numerical methods for solving ordinary differential equations (ODEs) are of central importance. Among these, the family of Runge-Kutta methods stands out due to its versatility and robustness. In this post we compare the first four orders of the Runge-Kutta methods, namely RK1 (Euler’s method), RK2, RK3, and RK4.

Earth's dipolar magnetic field

posted: updated:
In physics and computational mathematics, numerical methods for solving ordinary differential equations (ODEs) are of central importance. Among these, the family of Runge-Kutta methods stands out due to its versatility and robustness. In this post we compare the first four orders of the Runge-Kutta methods, namely RK1 (Euler’s method), RK2, RK3, and RK4.

#Image Processing (8)

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

Image denoising techniques: A comparison of PCA, kernel PCA, autoencoder, and CNN

posted:
In this post, we explore the performance of PCA, Kernel PCA, denoising autoencoder, and CNN for image denoising.

Bio-image registration with Python

posted:
Which method works best for which registration problem? In this tutorial we compare different methods for the registration of bio-images using Python.

Stable installation of Napari on a M1 Mac

posted:
In case you’re having problems installing Napari on your M1 Mac, try to install it from conda instead of pip.

Open Zarr files in Fiji

posted:
Both Zarr and OME-ZARR files are supported in Fiji. Here’s how to get it working.

Using Zarr for images – The OME-ZARR standard

posted:
As for any other NumPy array, we can use the Zarr file format to store image files. In this post we additionally explore the NGFF (next-generation file format) OME-ZARR standard.

Zarr – or: How to save NumPy arrays

posted: updated:
What is Zarr and why is it probably the most suitable file format for saving NumPy arrays?

New Teaching Material: Fiji short course

posted: updated:
There is a new tutorial in the Teaching Material. It’s a short Fiji tutorial on analyzing biomedical image data.

#Independent Web (10)

Switching to a Mastodon-powered comment system

posted:
I’m switching to a new Mastodon-powered comment system for my blog.

How to get an RSS feed of your Mastodon bookmarks

posted:
The third-party service Mastodon Bookmark RSS allows you to subscribe to your Mastodon bookmarks via RSS, so you don’t forget to make use out of them. You can even integrate the feed into your favorite Zettelkasten apps such as DEVONthink and Obsidian.

Moving a Mastodon account to another server

posted:
I recently moved my Mastodon account to a new server, including all my followers. I was surprised, how easy and seamless it worked. Here is a how-to, summarizing the migration steps.

Some useful Mastodon links

posted: updated:
This is a curated list of useful Mastodon links.    

I'm on Mastodon

posted: updated:
Mastodon is not just a Twitter alternative. It’s a free and open-source social media platform of its own kind. Here is my story how I got there.

Embedding flickr photos on your Jekyll website

posted:
Easily integrate entire flickr photosets on your Jekyll website via a ruby plugin.

On website subscriptions via RSS and Atom feeds

posted: updated:
Personal opinion on how to create and maintain personal news feeds beyond the dependence on big social media and tech companies.

Dealing with future posts in Jekyll

posted: updated:
While drafting blog posts in Jekyll, you may want to keep some posts hidden from the public eye until they’re ready to be published. In the world of blogging with Jekyll, there are several effective methods to draft such posts without immediately publishing them. Here are three practical approaches.

Running and testing your Jekyll site locally with custom options

posted: updated:
Developing with Jekyll often requires running your site locally to test changes before deploying them live. Here is a handy yet useful one-line command that I usually use to run my Jekyll site locally with custom options.

Running a personal website with Jekyll

posted: updated:
I have redesigned my website and moved it to a new host as well: I’m running it as personal Jekyll website hosted on GitHub now.

#Jekyll (13)

Switching to a Mastodon-powered comment system

posted:
I’m switching to a new Mastodon-powered comment system for my blog.

On website subscriptions via RSS and Atom feeds

posted: updated:
Personal opinion on how to create and maintain personal news feeds beyond the dependence on big social media and tech companies.

Dealing with future posts in Jekyll

posted: updated:
While drafting blog posts in Jekyll, you may want to keep some posts hidden from the public eye until they’re ready to be published. In the world of blogging with Jekyll, there are several effective methods to draft such posts without immediately publishing them. Here are three practical approaches.

Running and testing your Jekyll site locally with custom options

posted: updated:
Developing with Jekyll often requires running your site locally to test changes before deploying them live. Here is a handy yet useful one-line command that I usually use to run my Jekyll site locally with custom options.

Emojis for Jekyll via Jemoji

posted:
A how-to and a list of all currently working Emojis on Jekyll built websites.

strftime Cheat Sheet

posted: updated:
Cheat Sheet on formatted date and time strings used, e.g., in Python, C/C++ or even on Jekyll websites by using Liquid tags.

Liquid Cheat Sheet

posted:
This Cheat Sheet gives an overview of Liquid syntax commands one might encounter while developing a Jekyll website.

Minimal Mistakes Cheat Sheet

posted: updated:
A quick overview of available commands for creating content with the Minimal Mistakes Jekyll theme.

Supported syntax highlighting in Jekyll

posted:
A list of supported programming languages for Jekyll’s syntax highlighting.

How to use LaTeX in Markdown

posted:
A quick guide on how to enable MathJax support in your Markdown documents.

New Teaching Material: LaTeX Guide

posted: updated:
I’ve added a LaTeX guide to the General Teaching Materials in the teaching section. It serves as a Getting started with LaTeX guide and as a LaTeX glossary.

New Teaching Material: Markdown Guide

posted: updated:
I’ve composed a Markdown Guide for my teaching courses.

Running a personal website with Jekyll

posted: updated:
I have redesigned my website and moved it to a new host as well: I’m running it as personal Jekyll website hosted on GitHub now.

#Machine Learning/AI (24)

Building a neural network from scratch using NumPy

posted:
Ever thought about building you own neural network from scratch by simply using NumPy? In this post, we will do exactly that. We will build, from scratch, a simple feedforward neural network and train it on the MNIST dataset.

Conditional GANs

posted:
I was wondering whether it would be possible to let GANs generate samples conditioned on a specific input type. I wanted the GAN to generate samples of a specific digit, resembling a personal poor man’s mini DALL•E. And indeed, I found a GAN architecture, that allows what I was looking for: Conditional GANs.

Eliminating the middleman: Direct Wasserstein distance computation in WGANs without discriminator

posted:
We explore an alternative approach to implementing WGANs. Contrasting from the standard implementation that requires both a generator and discriminator, the method discussed here employs the optimal transport to compute the Wasserstein distance directly between the real and generated data distributions, eliminating the need for a discriminator.

Wasserstein GANs

posted:
We apply the Wasserstein distance to Generative Adversarial Networks (GANs) to train them more effectively. We compare a default GAN with a Wasserstein GAN (WGAN) trained on the MNIST dataset and discuss the advantages and disadvantages of both approaches.

Probability distance metrics in machine learning

posted:
Probabilistic distance metrics play a crucial role in a broad range of machine learning tasks, including clustering, classification, and information retrieval. The choice of metric is often determined by the specific requirements of the task at hand, with each having unique strengths and characteristics. In this post, we discuss five commonly used metrics: the Wasserstein Distance, the Kullback-Leibler Divergence (KL Divergence), the Jensen-Shannon Divergence (JS Divergence), the Total Variation Distance (TV Distance), and the Bhattacharyya Distance.

Comparing Wasserstein distance, sliced Wasserstein distance, and L2 norm

posted:
In machine learning, especially when dealing with probability distributions or deep generative models, different metrics are used to quantify the ‘distance’ between two distributions. Among these, the Wasserstein distance (EMD), sliced Wasserstein distance (SWD), and the L2 norm, play an important role. Here, we compare these metrics and discuss their advantages and disadvantages.

Approximating the Wasserstein distance with cumulative distribution functions

posted:
In the previous two posts, we’ve discussed the mathematical details of the Wasserstein distance, exploring its formal definition, its computation through linear programming and the Sinkhorn algorithm. In this post, we take a different approach by approximating the Wasserstein distance with cumulative distribution functions (CDF), providing a more intuitive understanding of the metric.

Wasserstein distance via entropy regularization (Sinkhorn algorithm)

posted: updated:
Calculating the Wasserstein distance can be computational costly when using linear programming. The Sinkhorn algorithm provides a computationally efficient method for approximating the Wasserstein distance, making it a practical choice for many applications, especially for large datasets.

Wasserstein distance and optimal transport

posted:
The Wasserstein distance, also known as the Earth Mover’s Distance (EMD), provides a robust and insightful approach for comparing probability distributions and finds application in various fields such as machine learning, data science, image processing, and information theory. In this post, we take a look at the optimal transport problem, required to calculate the Wasserstein distance, and how to calculate the distance metric in Python.

Visualizing Occam's Razor through machine learning

posted:
Here, we illustrate the concept of Occam’s Razor, a principle advocating for simplicity, by examining its manifestation in the domain of machine learning using Python.

The Integrate and Fire Model: A simple neuronal model

posted:
In this post we explore the Integrate-and-Fire model, a simplified representation of a neuron. We also run some simulations in Python to understand the model dynamics.

Assessing animal behavior with machine learning

posted:
High-throughput and multi-modal behavior experiments, coupled with machine learning analysis, unlock valuable insights into complex systems by capturing diverse behavioral responses and deciphering hidden structures within high-dimensional datasets. I just completed a short introductory lecture on this topic, which is now available in the Teachings section.

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

Using random forests for pixel classification

posted:
Beyond traditional classification problems, random forests have proven their effectiveness in pixel classification. In this post, we will delve into this domain and explore how random forests can be effectively utilized to tackle the task of pixel classification.

Decision Trees vs. Random Forests for classification and regression: A comparison

posted:
Decision trees and random forests are popular machine learning algorithms that are widely used for both classification and regression tasks. In this blog post, we elucidate their theoretical foundations and discuss the differences as well as their advantages and drawbacks.

Image denoising techniques: A comparison of PCA, kernel PCA, autoencoder, and CNN

posted:
In this post, we explore the performance of PCA, Kernel PCA, denoising autoencoder, and CNN for image denoising.

Using Autoencoders to reveal hidden structures in high-dimensional data

posted:
In this Python tutorial, we explore the application of Autoencoders for dimensionality reduction, demonstrating how this powerful technique can help us uncover and interpret hidden patterns within our data.

Unlocking hidden patterns with Factor Analysis

posted:
In this Python tutorial, we dive into Factor Analysis, a powerful statistical method used to uncover hidden, or ‘latent,’ variables within high-dimensional datasets. Like PCA, grasping this technique will allow us to simplify complex data structures, thereby aiding in more effective data interpretation and decision-making.

Untangling complexity: harnessing PCA for data dimensionality reduction

posted:
This tutorial explores the use of Principal Component Analysis (PCA), a powerful tool for reducing the complexity of high-dimensional data. By delving into both the theoretical underpinnings and practical Python applications, we illuminate how PCA can reveal hidden structures within data and make it more manageable for analysis.

t-SNE and PCA: Two powerful tools for data exploration

posted:
Dimensionality reduction techniques play a vital role in both data exploration and visualization. Among these techniques, t-SNE and PCA are widely used and offer valuable insights into complex datasets. In this blog post, we explore te mathematical background of both methods, compare their methodologies, and discuss their advantages and disadvantages. Additionally, we take a look at their practical implementation in Python and compare the results on different sample datasets.

Understanding L1 and L2 regularization in machine learning

posted:
Regularization techniques play a vital role in preventing overfitting and enhancing the generalization capability of machine learning models. Among these techniques, L1 and L2 regularization are widely employed for their effectiveness in controlling model complexity. In this blog post, we explore the concepts of L1 and L2 regularization and provide a practical demonstration in Python.

Understanding gradient descent in machine learning

posted:
Gradient descent is a fundamental optimization algorithm widely used in machine learning for finding the optimal parameters of a model. It is a powerful technique that enables models to learn from data by iteratively adjusting their parameters to minimize a cost or loss function. In this blog post, we explore the mathematical background of this method and showcase its implementation in Python.

How to run PyTorch on the M1 Mac GPU

posted:
As for TensorFlow, it takes only a few steps to enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with PyTorch.

How to run TensorFlow on the M1 Mac GPU

posted:
In just a few steps you can enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with TensorFlow.

#Markdown/LaTeX (30)

Bridging ideas on the go: WikiLinks come to DEVONthink To Go

posted:
The WikiLinks feature has finally arrived on DEVONthink to go, DEVONthink’s mobile app, which unleashes new possibilities to work with your Personal Knowledge Management (PKM) system on the go.

How to get an RSS feed of your Mastodon bookmarks

posted:
The third-party service Mastodon Bookmark RSS allows you to subscribe to your Mastodon bookmarks via RSS, so you don’t forget to make use out of them. You can even integrate the feed into your favorite Zettelkasten apps such as DEVONthink and Obsidian.

Track the growth of your Zettelkasten with DEVONthink

posted:
You can easily track the growth of your Zettelkasten using DEVONthink’s smart groups.

Problems with large vaults in Obsidian

posted:
In the past few days I played a bit with Obsidian. Turns out that its iOS app has some serious problems with large vaults.

DEVONthink and privacy

posted:
One thing I really love about DEVONthink, is its high security and privacy measures regarding the synchronization of my notes across different devices. No other app that I have so far used offered such high standards.

Using VS Code as LaTeX editor

posted:
It doesn’t take much to convert Visual Studio Code into a powerful LaTeX editor. Here are the necessary steps that enable full LaTeX support.

Hacks and extensions to improve your coding with Visual Studio Code

posted: updated:
This curated list contains useful hacks and extensions to improve the overall coding performance with Visual Studio Code (VS Code).

How DEVONthink's auto-WikiLink feature changed my Zettelkasten workflow

posted: updated:
DEVONthink’s automatic WikiLinks function is a powerful tool, both for discovering connections between notes – expected and unexpected ones – and for the automatized linking of these notes. In this post I briefly explain, how this feature has impacted my Zettelkasten workflow.

DEVONthink Markdown Table-of-Contents generator

posted: updated:
I wrote a custom AppleScript for DEVONthink Markdown files, that bypasses the problem of broken links in the auto-generated Table-of-Contents (TOC) of MultiMarkdown (MMD).

DEVONthink Image Toolbox

posted:
I just shared a collection of AppleScripts on GitHub for handling images in DEVONthink.

Floating Back-to-top button for Markdown documents

posted:
You can quickly add a floating Back-to-top button to your Markdown documents in just two steps.

Using Obsidian as a Zettelkasten

posted: updated:
In this post I show how you can quickly set up a Zettelkasten in Obsidian.

Using DEVONthink as a Zettelkasten

posted:
In this post I show how you can quickly set up a Zettelkasten in DEVONthink.

Use your Zettelkasten as a research, thinking and learning tool – Personal knowledge management as a system

posted: updated:
In the last part of the series about personal knowledge management, we dive deeper into the Zettelkasten method and demonstrate, how to integrate all parts as an overall system into our research workflow.

Take smart notes with the Zettelkasten method

posted: updated:
With the Zettelkasten method by Niklas Luhmann, we give the previously presented personal knowledge network a concrete shape and practical implementation. This is the second of three parts of the series about personal knowledge management.

Don't take isolated notes, connect them! Vannevar Bush on building a self-organizing network of knowledge

posted: updated:
In 1945, Vannevar Bush presented his concept of a self-organizing personal knowledge network by linking informational units with each other. This concept, that would later be known as the Hypertext concept or Hypertext theory, provides the theoretical base of the personal knowledge management system presented in the short series on that topic. This is the first of three parts of that series.

Boost your research with a smart personal knowledge management system

posted: updated:
My next posts will be a short series about personal knowledge management and how it can be integrated as a holistic system into our overall research workflow. The system is based on the Hypertext Theory and the Zettelkasten method, and its core element is the personal note-taking process. We go step by step through all parts and see, how we can practically implement them into our daily research work.

Clean Thesis: A simple and elegant LaTeX thesis template

posted:
If you’re looking for some inspiration for your thesis, I just came across Clean Thesis by Ricardo Langner, a simple and elegant LaTeX template for thesis documents.

Using Markdown for note-taking

posted:
It might be a bit difficult to learn at the beginning, but there are several benefits of taking personal notes in Markdown. Here is why I switched.

Free LaTeX editors

posted: updated:
A list of currently freely available LaTeX editors (constantly updated).

Markdown vs. LaTeX for Scientific Writing

posted:
A comparison of Markdown and LaTeX in regard of scientific writing.

Free Markdown editors

posted: updated:
A list of currently freely available Markdown editors (constantly updated).

Emojis for Jekyll via Jemoji

posted:
A how-to and a list of all currently working Emojis on Jekyll built websites.

strftime Cheat Sheet

posted: updated:
Cheat Sheet on formatted date and time strings used, e.g., in Python, C/C++ or even on Jekyll websites by using Liquid tags.

Liquid Cheat Sheet

posted:
This Cheat Sheet gives an overview of Liquid syntax commands one might encounter while developing a Jekyll website.

Minimal Mistakes Cheat Sheet

posted: updated:
A quick overview of available commands for creating content with the Minimal Mistakes Jekyll theme.

Supported syntax highlighting in Jekyll

posted:
A list of supported programming languages for Jekyll’s syntax highlighting.

How to use LaTeX in Markdown

posted:
A quick guide on how to enable MathJax support in your Markdown documents.

New Teaching Material: LaTeX Guide

posted: updated:
I’ve added a LaTeX guide to the General Teaching Materials in the teaching section. It serves as a Getting started with LaTeX guide and as a LaTeX glossary.

New Teaching Material: Markdown Guide

posted: updated:
I’ve composed a Markdown Guide for my teaching courses.

#Neuroscience (11)

The Integrate and Fire Model: A simple neuronal model

posted:
In this post we explore the Integrate-and-Fire model, a simplified representation of a neuron. We also run some simulations in Python to understand the model dynamics.

Assessing animal behavior with machine learning

posted:
High-throughput and multi-modal behavior experiments, coupled with machine learning analysis, unlock valuable insights into complex systems by capturing diverse behavioral responses and deciphering hidden structures within high-dimensional datasets. I just completed a short introductory lecture on this topic, which is now available in the Teachings section.

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

New publication on Tauopathy

posted:
A new study on Tauopathy in which our lab was involved has just been published.

Mutual information and its relationship to information entropy

posted:
Mutual information is an essential measure in information theory that quantifies the statistical dependence between two random variables. Given its broad applicability, it has become an invaluable tool in diverse fields like machine learning, neuroscience, signal processing, and more. This post explores the mathematical foundations of mutual information and its relationship to information entropy. We will also demonstrate its implementation in some Python examples.

Information entropy

posted:
A fundamental concept that plays a pivotal role in quantifying the uncertainty or randomness of a set of data is the information entropy. Information entropy provides a measure of the average amount of information or surprise contained in a random variable. In this blog post, we explore its mathematical foundations and demonstrate its implementation in some Python examples.

How to read patch clamp recordings in WaveMetrics IGOR binary files (ibw) in Python

posted:
This is a mini tutorial on how to read patch clamp recordings in WaveMetrics IGOR binary files (*.ibw) in Python using the neo and igor packages.

New Teaching Material: Python Cheat Sheets

posted:
I’ve started a collection of various Python cheat sheets that contain some useful and commonly used commands and usage examples.

New Teaching Material: Statistical data analysis and basic time series analysis with Python

posted:
I’ve added two new tutorials in the teaching section on statistical data analysis and basic time series analysis with Python.

New Teaching Material: Analyzing IGOR binary files of patch clamp recordings

posted:
I’ve added a new tutorial in the teaching section on how to read and process IGOR binary files (ibw) of patch clamp recordings.

New Teaching Material: Fiji short course

posted: updated:
There is a new tutorial in the Teaching Material. It’s a short Fiji tutorial on analyzing biomedical image data.

#Open Source (29)

Switching to a Mastodon-powered comment system

posted:
I’m switching to a new Mastodon-powered comment system for my blog.

Mamba vs. Conda: Unleashing lightning-fast Python package installations

posted: updated:
If you’ve ever experienced the frustration of waiting for ages while installing Python packages with conda, there’s a game-changer I wish I’d heard about earlier: Mamba. This lightning-fast package manager surprised me with its incredible speed, making package installations a breeze. Here is my personal experience and why Mamba is the speed demon you may have been looking for.

Assessing animal behavior with machine learning

posted:
High-throughput and multi-modal behavior experiments, coupled with machine learning analysis, unlock valuable insights into complex systems by capturing diverse behavioral responses and deciphering hidden structures within high-dimensional datasets. I just completed a short introductory lecture on this topic, which is now available in the Teachings section.

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

How to get an RSS feed of your Mastodon bookmarks

posted:
The third-party service Mastodon Bookmark RSS allows you to subscribe to your Mastodon bookmarks via RSS, so you don’t forget to make use out of them. You can even integrate the feed into your favorite Zettelkasten apps such as DEVONthink and Obsidian.

Bio-image registration with Python

posted:
Which method works best for which registration problem? In this tutorial we compare different methods for the registration of bio-images using Python.

Moving a Mastodon account to another server

posted:
I recently moved my Mastodon account to a new server, including all my followers. I was surprised, how easy and seamless it worked. Here is a how-to, summarizing the migration steps.

Some useful Mastodon links

posted: updated:
This is a curated list of useful Mastodon links.    

I'm on Mastodon

posted: updated:
Mastodon is not just a Twitter alternative. It’s a free and open-source social media platform of its own kind. Here is my story how I got there.

Embedding flickr photos on your Jekyll website

posted:
Easily integrate entire flickr photosets on your Jekyll website via a ruby plugin.

How to run PyTorch on the M1 Mac GPU

posted:
As for TensorFlow, it takes only a few steps to enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with PyTorch.

How to run TensorFlow on the M1 Mac GPU

posted:
In just a few steps you can enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with TensorFlow.

Is there a difference between miniconda and miniforge?

posted:
Simply said: not really. Miniconda is the company driven minimal conda installer, while miniforge is its community driven variant. In the end, you’ll get the same minimal conda installation on your machine – with a minor difference.

Hacks and extensions to improve your coding with Visual Studio Code

posted: updated:
This curated list contains useful hacks and extensions to improve the overall coding performance with Visual Studio Code (VS Code).

Setting up Visual Studio Code for Python

posted: updated:
In just a few steps you can turn Visual Studio Code (VS Code) into a powerful Python editor for both pure Python code and Jupyter Notebooks.

Enable interactive plots and other plot modes in Jupyter notebooks

posted:
Learn how to enable interactive, static and stand-alone window plots in Jupyter notebooks with the magic command %matplotlib.

Enable code folding in JupyterLab

posted:
Learn how to enable code folding in JupyterLab for both, Jupyter Notebooks and pure Python scripts.

How to create and apply a requirements.txt file in Python

posted: updated:
Learn how to install Python packages with a requirements.txt file and how to create one yourself.

Virtual environments with venv

posted: updated:
In addition to conda’s create command, Python’s built-in venv command offers another way for creating virtual environments.

Using pip to install Python packages

posted: updated:
pip is another package installer for Python. Learn how to use it for installing and managing Python packages in your projects.

How to install and run Python code from GitHub

posted:
Learn how to install code from GitHub, that is, e.g., not (yet) available via conda or pip.

A minimal Python installation with miniconda

posted: updated:
Learn how to install miniconda to have a quick and minimal Python installation on any operating system. Also learn how to use conda to create and manage virtual environments, install packages, run Python scripts and run Jupyter Notebooks and JupyterLab.

Stable installation of Napari on a M1 Mac

posted:
In case you’re having problems installing Napari on your M1 Mac, try to install it from conda instead of pip.

Open Zarr files in Fiji

posted:
Both Zarr and OME-ZARR files are supported in Fiji. Here’s how to get it working.

Using Zarr for images – The OME-ZARR standard

posted:
As for any other NumPy array, we can use the Zarr file format to store image files. In this post we additionally explore the NGFF (next-generation file format) OME-ZARR standard.

Zarr – or: How to save NumPy arrays

posted: updated:
What is Zarr and why is it probably the most suitable file format for saving NumPy arrays?

Variable Explorer in Jupyter Notebooks

posted:
Extend your Jupyter environment with Notebook Extensions and enable, e.g., the option to explore your currently defined variables in a running Jupyter session.

Clean Thesis: A simple and elegant LaTeX thesis template

posted:
If you’re looking for some inspiration for your thesis, I just came across Clean Thesis by Ricardo Langner, a simple and elegant LaTeX template for thesis documents.

My website is now completely cookie-free

posted: updated:
I made several changes to my website to further increase the privacy protection. As a result, it runs now completely without cookies.

#Personal Knowledge Management (18)

Bridging ideas on the go: WikiLinks come to DEVONthink To Go

posted:
The WikiLinks feature has finally arrived on DEVONthink to go, DEVONthink’s mobile app, which unleashes new possibilities to work with your Personal Knowledge Management (PKM) system on the go.

How to get an RSS feed of your Mastodon bookmarks

posted:
The third-party service Mastodon Bookmark RSS allows you to subscribe to your Mastodon bookmarks via RSS, so you don’t forget to make use out of them. You can even integrate the feed into your favorite Zettelkasten apps such as DEVONthink and Obsidian.

Track the growth of your Zettelkasten with DEVONthink

posted:
You can easily track the growth of your Zettelkasten using DEVONthink’s smart groups.

Problems with large vaults in Obsidian

posted:
In the past few days I played a bit with Obsidian. Turns out that its iOS app has some serious problems with large vaults.

DEVONthink and privacy

posted:
One thing I really love about DEVONthink, is its high security and privacy measures regarding the synchronization of my notes across different devices. No other app that I have so far used offered such high standards.

Putting text sources into the Zettelkasten?

posted:
Should text sources (ebooks, PDF, website snapshots) be saved in a Zettelkasten?

On project notes in the Zettelkasten

posted:
Should project notes be a type of notes of their own in our Zettelkasten?

How DEVONthink's auto-WikiLink feature changed my Zettelkasten workflow

posted: updated:
DEVONthink’s automatic WikiLinks function is a powerful tool, both for discovering connections between notes – expected and unexpected ones – and for the automatized linking of these notes. In this post I briefly explain, how this feature has impacted my Zettelkasten workflow.

DEVONthink Markdown Table-of-Contents generator

posted: updated:
I wrote a custom AppleScript for DEVONthink Markdown files, that bypasses the problem of broken links in the auto-generated Table-of-Contents (TOC) of MultiMarkdown (MMD).

DEVONthink Image Toolbox

posted:
I just shared a collection of AppleScripts on GitHub for handling images in DEVONthink.

Floating Back-to-top button for Markdown documents

posted:
You can quickly add a floating Back-to-top button to your Markdown documents in just two steps.

Using Obsidian as a Zettelkasten

posted: updated:
In this post I show how you can quickly set up a Zettelkasten in Obsidian.

Using DEVONthink as a Zettelkasten

posted:
In this post I show how you can quickly set up a Zettelkasten in DEVONthink.

Use your Zettelkasten as a research, thinking and learning tool – Personal knowledge management as a system

posted: updated:
In the last part of the series about personal knowledge management, we dive deeper into the Zettelkasten method and demonstrate, how to integrate all parts as an overall system into our research workflow.

Take smart notes with the Zettelkasten method

posted: updated:
With the Zettelkasten method by Niklas Luhmann, we give the previously presented personal knowledge network a concrete shape and practical implementation. This is the second of three parts of the series about personal knowledge management.

Don't take isolated notes, connect them! Vannevar Bush on building a self-organizing network of knowledge

posted: updated:
In 1945, Vannevar Bush presented his concept of a self-organizing personal knowledge network by linking informational units with each other. This concept, that would later be known as the Hypertext concept or Hypertext theory, provides the theoretical base of the personal knowledge management system presented in the short series on that topic. This is the first of three parts of that series.

Boost your research with a smart personal knowledge management system

posted: updated:
My next posts will be a short series about personal knowledge management and how it can be integrated as a holistic system into our overall research workflow. The system is based on the Hypertext Theory and the Zettelkasten method, and its core element is the personal note-taking process. We go step by step through all parts and see, how we can practically implement them into our daily research work.

Using Markdown for note-taking

posted:
It might be a bit difficult to learn at the beginning, but there are several benefits of taking personal notes in Markdown. Here is why I switched.

#Personal Opinion (13)

Visualizing Occam's Razor through machine learning

posted:
Here, we illustrate the concept of Occam’s Razor, a principle advocating for simplicity, by examining its manifestation in the domain of machine learning using Python.

Zen and natural sciences

posted: updated:
In this post, I broaden the scope and explore the intersections of Zen and natural sciences more generally.

The Zen of Python

posted:
The connection between Zen and programming is not a subjective one at all. For instance, Python has built it directly into its core programming, known as The Zen of Python.

The Zen of programming

posted:
Some thoughts about the connections between Zen and programming.

DEVONthink and privacy

posted:
One thing I really love about DEVONthink, is its high security and privacy measures regarding the synchronization of my notes across different devices. No other app that I have so far used offered such high standards.

I'm on Mastodon

posted: updated:
Mastodon is not just a Twitter alternative. It’s a free and open-source social media platform of its own kind. Here is my story how I got there.

Laying off thousands of employees: Not okay! How to delete a Twitter account

posted: updated:
Putting thousands of people on the street is anything else than cool. Here is how to fix it.

Putting text sources into the Zettelkasten?

posted:
Should text sources (ebooks, PDF, website snapshots) be saved in a Zettelkasten?

On project notes in the Zettelkasten

posted:
Should project notes be a type of notes of their own in our Zettelkasten?

The quickest way to find help for Python commands: The help() command

posted:
Python’s built-in help system is probably the fastest way, to quickly look up Python commands and their syntax. It works without leaving your Python environment and is fully offline available.

On teaching

posted: updated:
I strongly believe that teaching is not a unidirectional thing, but both sides, the participants and the teacher benefit from it. This is a personal comment on teaching.

On website subscriptions via RSS and Atom feeds

posted: updated:
Personal opinion on how to create and maintain personal news feeds beyond the dependence on big social media and tech companies.

German Angst

posted: updated:
Co-effects of the Corona lockdown: people buy like crazy toilet paper, until nothing is left anymore. This is a copycat work, the original work from David Hugendick can be found on twitter .

#Photography (1)

Embedding flickr photos on your Jekyll website

posted:
Easily integrate entire flickr photosets on your Jekyll website via a ruby plugin.

#Privacy (3)

DEVONthink and privacy

posted:
One thing I really love about DEVONthink, is its high security and privacy measures regarding the synchronization of my notes across different devices. No other app that I have so far used offered such high standards.

My website is now completely cookie-free

posted: updated:
I made several changes to my website to further increase the privacy protection. As a result, it runs now completely without cookies.

On website subscriptions via RSS and Atom feeds

posted: updated:
Personal opinion on how to create and maintain personal news feeds beyond the dependence on big social media and tech companies.

#Python (64)

Building a neural network from scratch using NumPy

posted:
Ever thought about building you own neural network from scratch by simply using NumPy? In this post, we will do exactly that. We will build, from scratch, a simple feedforward neural network and train it on the MNIST dataset.

Python's version logos

posted:
Have you ever noticed that Python has introduced individual version logos starting with version 3.10? I couldn’t find any official announcement, but luckily, the Python community on Mastodon was able to help out.

Conditional GANs

posted:
I was wondering whether it would be possible to let GANs generate samples conditioned on a specific input type. I wanted the GAN to generate samples of a specific digit, resembling a personal poor man’s mini DALL•E. And indeed, I found a GAN architecture, that allows what I was looking for: Conditional GANs.

Eliminating the middleman: Direct Wasserstein distance computation in WGANs without discriminator

posted:
We explore an alternative approach to implementing WGANs. Contrasting from the standard implementation that requires both a generator and discriminator, the method discussed here employs the optimal transport to compute the Wasserstein distance directly between the real and generated data distributions, eliminating the need for a discriminator.

Wasserstein GANs

posted:
We apply the Wasserstein distance to Generative Adversarial Networks (GANs) to train them more effectively. We compare a default GAN with a Wasserstein GAN (WGAN) trained on the MNIST dataset and discuss the advantages and disadvantages of both approaches.

Probability distance metrics in machine learning

posted:
Probabilistic distance metrics play a crucial role in a broad range of machine learning tasks, including clustering, classification, and information retrieval. The choice of metric is often determined by the specific requirements of the task at hand, with each having unique strengths and characteristics. In this post, we discuss five commonly used metrics: the Wasserstein Distance, the Kullback-Leibler Divergence (KL Divergence), the Jensen-Shannon Divergence (JS Divergence), the Total Variation Distance (TV Distance), and the Bhattacharyya Distance.

Comparing Wasserstein distance, sliced Wasserstein distance, and L2 norm

posted:
In machine learning, especially when dealing with probability distributions or deep generative models, different metrics are used to quantify the ‘distance’ between two distributions. Among these, the Wasserstein distance (EMD), sliced Wasserstein distance (SWD), and the L2 norm, play an important role. Here, we compare these metrics and discuss their advantages and disadvantages.

Approximating the Wasserstein distance with cumulative distribution functions

posted:
In the previous two posts, we’ve discussed the mathematical details of the Wasserstein distance, exploring its formal definition, its computation through linear programming and the Sinkhorn algorithm. In this post, we take a different approach by approximating the Wasserstein distance with cumulative distribution functions (CDF), providing a more intuitive understanding of the metric.

Wasserstein distance via entropy regularization (Sinkhorn algorithm)

posted: updated:
Calculating the Wasserstein distance can be computational costly when using linear programming. The Sinkhorn algorithm provides a computationally efficient method for approximating the Wasserstein distance, making it a practical choice for many applications, especially for large datasets.

Wasserstein distance and optimal transport

posted:
The Wasserstein distance, also known as the Earth Mover’s Distance (EMD), provides a robust and insightful approach for comparing probability distributions and finds application in various fields such as machine learning, data science, image processing, and information theory. In this post, we take a look at the optimal transport problem, required to calculate the Wasserstein distance, and how to calculate the distance metric in Python.

Visualizing Occam's Razor through machine learning

posted:
Here, we illustrate the concept of Occam’s Razor, a principle advocating for simplicity, by examining its manifestation in the domain of machine learning using Python.

Zen and natural sciences

posted: updated:
In this post, I broaden the scope and explore the intersections of Zen and natural sciences more generally.

The Zen of Python

posted:
The connection between Zen and programming is not a subjective one at all. For instance, Python has built it directly into its core programming, known as The Zen of Python.

The Zen of programming

posted:
Some thoughts about the connections between Zen and programming.

Mamba vs. Conda: Unleashing lightning-fast Python package installations

posted: updated:
If you’ve ever experienced the frustration of waiting for ages while installing Python packages with conda, there’s a game-changer I wish I’d heard about earlier: Mamba. This lightning-fast package manager surprised me with its incredible speed, making package installations a breeze. Here is my personal experience and why Mamba is the speed demon you may have been looking for.

The Integrate and Fire Model: A simple neuronal model

posted:
In this post we explore the Integrate-and-Fire model, a simplified representation of a neuron. We also run some simulations in Python to understand the model dynamics.

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

Using random forests for pixel classification

posted:
Beyond traditional classification problems, random forests have proven their effectiveness in pixel classification. In this post, we will delve into this domain and explore how random forests can be effectively utilized to tackle the task of pixel classification.

Decision Trees vs. Random Forests for classification and regression: A comparison

posted:
Decision trees and random forests are popular machine learning algorithms that are widely used for both classification and regression tasks. In this blog post, we elucidate their theoretical foundations and discuss the differences as well as their advantages and drawbacks.

Image denoising techniques: A comparison of PCA, kernel PCA, autoencoder, and CNN

posted:
In this post, we explore the performance of PCA, Kernel PCA, denoising autoencoder, and CNN for image denoising.

Using Autoencoders to reveal hidden structures in high-dimensional data

posted:
In this Python tutorial, we explore the application of Autoencoders for dimensionality reduction, demonstrating how this powerful technique can help us uncover and interpret hidden patterns within our data.

Unlocking hidden patterns with Factor Analysis

posted:
In this Python tutorial, we dive into Factor Analysis, a powerful statistical method used to uncover hidden, or ‘latent,’ variables within high-dimensional datasets. Like PCA, grasping this technique will allow us to simplify complex data structures, thereby aiding in more effective data interpretation and decision-making.

Untangling complexity: harnessing PCA for data dimensionality reduction

posted:
This tutorial explores the use of Principal Component Analysis (PCA), a powerful tool for reducing the complexity of high-dimensional data. By delving into both the theoretical underpinnings and practical Python applications, we illuminate how PCA can reveal hidden structures within data and make it more manageable for analysis.

t-SNE and PCA: Two powerful tools for data exploration

posted:
Dimensionality reduction techniques play a vital role in both data exploration and visualization. Among these techniques, t-SNE and PCA are widely used and offer valuable insights into complex datasets. In this blog post, we explore te mathematical background of both methods, compare their methodologies, and discuss their advantages and disadvantages. Additionally, we take a look at their practical implementation in Python and compare the results on different sample datasets.

Understanding L1 and L2 regularization in machine learning

posted:
Regularization techniques play a vital role in preventing overfitting and enhancing the generalization capability of machine learning models. Among these techniques, L1 and L2 regularization are widely employed for their effectiveness in controlling model complexity. In this blog post, we explore the concepts of L1 and L2 regularization and provide a practical demonstration in Python.

Understanding gradient descent in machine learning

posted:
Gradient descent is a fundamental optimization algorithm widely used in machine learning for finding the optimal parameters of a model. It is a powerful technique that enables models to learn from data by iteratively adjusting their parameters to minimize a cost or loss function. In this blog post, we explore the mathematical background of this method and showcase its implementation in Python.

Loading and saving files in Google Colab

posted:
Enable I/O support in your notebooks running in Google Colab with just a few additional commands.

Mutual information and its relationship to information entropy

posted:
Mutual information is an essential measure in information theory that quantifies the statistical dependence between two random variables. Given its broad applicability, it has become an invaluable tool in diverse fields like machine learning, neuroscience, signal processing, and more. This post explores the mathematical foundations of mutual information and its relationship to information entropy. We will also demonstrate its implementation in some Python examples.

Information entropy

posted:
A fundamental concept that plays a pivotal role in quantifying the uncertainty or randomness of a set of data is the information entropy. Information entropy provides a measure of the average amount of information or surprise contained in a random variable. In this blog post, we explore its mathematical foundations and demonstrate its implementation in some Python examples.

Understanding entropy

posted:
In physics, entropy is a fundamental concept that plays a crucial role in understanding the behavior of physical systems. It provides a measure of the disorder or randomness within a system, and its study has far-reaching applications across various branches of physics. This blog post aims to provide a brief overview of entropy in order to gain a better understanding of it.

Bio-image registration with Python

posted:
Which method works best for which registration problem? In this tutorial we compare different methods for the registration of bio-images using Python.

How to run PyTorch on the M1 Mac GPU

posted:
As for TensorFlow, it takes only a few steps to enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with PyTorch.

How to run TensorFlow on the M1 Mac GPU

posted:
In just a few steps you can enable a Mac with M1 chip (Apple silicon) for machine learning tasks in Python with TensorFlow.

Is there a difference between miniconda and miniforge?

posted:
Simply said: not really. Miniconda is the company driven minimal conda installer, while miniforge is its community driven variant. In the end, you’ll get the same minimal conda installation on your machine – with a minor difference.

Hacks and extensions to improve your coding with Visual Studio Code

posted: updated:
This curated list contains useful hacks and extensions to improve the overall coding performance with Visual Studio Code (VS Code).

Setting up Visual Studio Code for Python

posted: updated:
In just a few steps you can turn Visual Studio Code (VS Code) into a powerful Python editor for both pure Python code and Jupyter Notebooks.

Enable interactive plots and other plot modes in Jupyter notebooks

posted:
Learn how to enable interactive, static and stand-alone window plots in Jupyter notebooks with the magic command %matplotlib.

Enable code folding in JupyterLab

posted:
Learn how to enable code folding in JupyterLab for both, Jupyter Notebooks and pure Python scripts.

How to create and apply a requirements.txt file in Python

posted: updated:
Learn how to install Python packages with a requirements.txt file and how to create one yourself.

Virtual environments with venv

posted: updated:
In addition to conda’s create command, Python’s built-in venv command offers another way for creating virtual environments.

Using pip to install Python packages

posted: updated:
pip is another package installer for Python. Learn how to use it for installing and managing Python packages in your projects.

How to install and run Python code from GitHub

posted:
Learn how to install code from GitHub, that is, e.g., not (yet) available via conda or pip.

A minimal Python installation with miniconda

posted: updated:
Learn how to install miniconda to have a quick and minimal Python installation on any operating system. Also learn how to use conda to create and manage virtual environments, install packages, run Python scripts and run Jupyter Notebooks and JupyterLab.

Using Zarr for images – The OME-ZARR standard

posted:
As for any other NumPy array, we can use the Zarr file format to store image files. In this post we additionally explore the NGFF (next-generation file format) OME-ZARR standard.

Zarr – or: How to save NumPy arrays

posted: updated:
What is Zarr and why is it probably the most suitable file format for saving NumPy arrays?

How to read patch clamp recordings in WaveMetrics IGOR binary files (ibw) in Python

posted:
This is a mini tutorial on how to read patch clamp recordings in WaveMetrics IGOR binary files (*.ibw) in Python using the neo and igor packages.

How to add statistical annotations to matplotlib plots

posted:
This mini tutorial shows, how to add statistical annotations to matplotlib plots with just a few commands.

Make matplotlib plots look more appealing with just a few extra commands

posted:
Learn how to nice up matplotlib plots with just a few hacks.

Variable Explorer in Jupyter Notebooks

posted:
Extend your Jupyter environment with Notebook Extensions and enable, e.g., the option to explore your currently defined variables in a running Jupyter session.

Opening a Jupyter notebook from GitHub in Binder: A step-by-step guide

posted:
Opening a Jupyter notebook from GitHub in Binder simplifies access to shared code and facilitates seamless collaboration. With just a few steps, you can launch and interact with Jupyter notebooks directly in your browser, without the need for complex setup procedures.

New Teaching Material: Python Cheat Sheets

posted:
I’ve started a collection of various Python cheat sheets that contain some useful and commonly used commands and usage examples.

New Teaching Material: Statistical data analysis and basic time series analysis with Python

posted:
I’ve added two new tutorials in the teaching section on statistical data analysis and basic time series analysis with Python.

New Teaching Material: Analyzing IGOR binary files of patch clamp recordings

posted:
I’ve added a new tutorial in the teaching section on how to read and process IGOR binary files (ibw) of patch clamp recordings.

strftime Cheat Sheet

posted: updated:
Cheat Sheet on formatted date and time strings used, e.g., in Python, C/C++ or even on Jekyll websites by using Liquid tags.

Supported syntax highlighting in Jekyll

posted:
A list of supported programming languages for Jekyll’s syntax highlighting.

New Teaching Material: Markdown Guide

posted: updated:
I’ve composed a Markdown Guide for my teaching courses.

The Weierstrass function and the beauty of fractals

posted: updated:
Fractals are captivating mathematical objects that exhibit intricate patterns and self-similarity at various scales. In this post, we explore the elegance and significance of the Weierstrass function, its relation to fractals and fractal geometry, and discuss other notable fractals. Through this journey, we will discover the fascinating world of fractal geometry and its beautiful and profound impact.

The Lotka-Volterra equations: Modeling predator-prey dynamics

posted: updated:
The Lotka-Volterra system, also known as the predator-prey equations, is a mathematical model that describes the interaction between two species: predators and their prey. The system captures the dynamic relationship between the population sizes of predators and prey over time, highlighting the intricate balance between them. In this post we explore this system and calculate its numerical solution using numerical integration Python.

Interactive COVID-19 data exploration with Jupyter notebooks

posted: updated:
Amidst the ongoing challenges of the COVID-19 pandemic, I have written a Jupyter notebook that facilitates interactive exploration of COVID-19 data. You can select specific countries and visualize key aspects such as confirmed cases, deaths, and vaccinations. The notebook is openly available on GitHub. Feel free to use and share it.

The SIR model: A mathematical approach to epidemic dynamics

posted: updated:
In the wake of the COVID-19 pandemic, epidemiological models have garnered significant attention for their ability to provide insights into the spread and control of infectious diseases. One such model is the SIR model, forming the foundation for studying the dynamics of epidemics. In this blog post, we delve into the details of the SIR model, providing a mathematical description, and showcasing its application through a Python simulation.

The two-body problem

posted: updated:
The two-body system is a classical problem in physics. It describes the motion of two massive objects that are influenced by their mutual gravitational attraction. The two-body problem is a special case of the n-body problem, which describes the motion of two objects that are influenced by their mutual gravitational attraction. In this post, we make use of Runge-Kutta methods to solve the according equations of motion and simulate the trajectories of artificial satellites around the Earth.

Solving the Lorenz system using Runge-Kutta methods

posted: updated:
In my previous post, I introduced the Runge-Kutta methods for numerically solving ordinary differential equations (ODEs), that are challenging to solve analytically. In this post, we apply the Runge-Kutta methods to solve the Lorenz system. The Lorenz system is a set of differential equations known for its chaotic behavior and non-linear dynamics. By utilizing the Runge-Kutta methods, we can effectively simulate and analyze the intricate dynamics of this system.

Runge-Kutta methods for solving ODEs

posted: updated:
In physics and computational mathematics, numerical methods for solving ordinary differential equations (ODEs) are of central importance. Among these, the family of Runge-Kutta methods stands out due to its versatility and robustness. In this post we compare the first four orders of the Runge-Kutta methods, namely RK1 (Euler’s method), RK2, RK3, and RK4.

Earth's dipolar magnetic field

posted: updated:
In physics and computational mathematics, numerical methods for solving ordinary differential equations (ODEs) are of central importance. Among these, the family of Runge-Kutta methods stands out due to its versatility and robustness. In this post we compare the first four orders of the Runge-Kutta methods, namely RK1 (Euler’s method), RK2, RK3, and RK4.

#Scientific Writing (27)

Bridging ideas on the go: WikiLinks come to DEVONthink To Go

posted:
The WikiLinks feature has finally arrived on DEVONthink to go, DEVONthink’s mobile app, which unleashes new possibilities to work with your Personal Knowledge Management (PKM) system on the go.

How to get an RSS feed of your Mastodon bookmarks

posted:
The third-party service Mastodon Bookmark RSS allows you to subscribe to your Mastodon bookmarks via RSS, so you don’t forget to make use out of them. You can even integrate the feed into your favorite Zettelkasten apps such as DEVONthink and Obsidian.

Track the growth of your Zettelkasten with DEVONthink

posted:
You can easily track the growth of your Zettelkasten using DEVONthink’s smart groups.

Problems with large vaults in Obsidian

posted:
In the past few days I played a bit with Obsidian. Turns out that its iOS app has some serious problems with large vaults.

DEVONthink and privacy

posted:
One thing I really love about DEVONthink, is its high security and privacy measures regarding the synchronization of my notes across different devices. No other app that I have so far used offered such high standards.

Using VS Code as LaTeX editor

posted:
It doesn’t take much to convert Visual Studio Code into a powerful LaTeX editor. Here are the necessary steps that enable full LaTeX support.

Putting text sources into the Zettelkasten?

posted:
Should text sources (ebooks, PDF, website snapshots) be saved in a Zettelkasten?

On project notes in the Zettelkasten

posted:
Should project notes be a type of notes of their own in our Zettelkasten?

The Feynman problem-solving algorithm

posted:
Yet another problem-solving approach by Richard Feynman.

The Feynman method as an effective learning tool

posted:
The Feynman method can help you not only to remember new knowledge, but also to really and deeply understand it.

How DEVONthink's auto-WikiLink feature changed my Zettelkasten workflow

posted: updated:
DEVONthink’s automatic WikiLinks function is a powerful tool, both for discovering connections between notes – expected and unexpected ones – and for the automatized linking of these notes. In this post I briefly explain, how this feature has impacted my Zettelkasten workflow.

DEVONthink Markdown Table-of-Contents generator

posted: updated:
I wrote a custom AppleScript for DEVONthink Markdown files, that bypasses the problem of broken links in the auto-generated Table-of-Contents (TOC) of MultiMarkdown (MMD).

DEVONthink Image Toolbox

posted:
I just shared a collection of AppleScripts on GitHub for handling images in DEVONthink.

Floating Back-to-top button for Markdown documents

posted:
You can quickly add a floating Back-to-top button to your Markdown documents in just two steps.

Using Obsidian as a Zettelkasten

posted: updated:
In this post I show how you can quickly set up a Zettelkasten in Obsidian.

Using DEVONthink as a Zettelkasten

posted:
In this post I show how you can quickly set up a Zettelkasten in DEVONthink.

Use your Zettelkasten as a research, thinking and learning tool – Personal knowledge management as a system

posted: updated:
In the last part of the series about personal knowledge management, we dive deeper into the Zettelkasten method and demonstrate, how to integrate all parts as an overall system into our research workflow.

Take smart notes with the Zettelkasten method

posted: updated:
With the Zettelkasten method by Niklas Luhmann, we give the previously presented personal knowledge network a concrete shape and practical implementation. This is the second of three parts of the series about personal knowledge management.

Don't take isolated notes, connect them! Vannevar Bush on building a self-organizing network of knowledge

posted: updated:
In 1945, Vannevar Bush presented his concept of a self-organizing personal knowledge network by linking informational units with each other. This concept, that would later be known as the Hypertext concept or Hypertext theory, provides the theoretical base of the personal knowledge management system presented in the short series on that topic. This is the first of three parts of that series.

Boost your research with a smart personal knowledge management system

posted: updated:
My next posts will be a short series about personal knowledge management and how it can be integrated as a holistic system into our overall research workflow. The system is based on the Hypertext Theory and the Zettelkasten method, and its core element is the personal note-taking process. We go step by step through all parts and see, how we can practically implement them into our daily research work.

Clean Thesis: A simple and elegant LaTeX thesis template

posted:
If you’re looking for some inspiration for your thesis, I just came across Clean Thesis by Ricardo Langner, a simple and elegant LaTeX template for thesis documents.

Free LaTeX editors

posted: updated:
A list of currently freely available LaTeX editors (constantly updated).

Markdown vs. LaTeX for Scientific Writing

posted:
A comparison of Markdown and LaTeX in regard of scientific writing.

Free Markdown editors

posted: updated:
A list of currently freely available Markdown editors (constantly updated).

How to use LaTeX in Markdown

posted:
A quick guide on how to enable MathJax support in your Markdown documents.

New Teaching Material: LaTeX Guide

posted: updated:
I’ve added a LaTeX guide to the General Teaching Materials in the teaching section. It serves as a Getting started with LaTeX guide and as a LaTeX glossary.

New Teaching Material: Markdown Guide

posted: updated:
I’ve composed a Markdown Guide for my teaching courses.

#Teaching (16)

Assessing animal behavior with machine learning

posted:
High-throughput and multi-modal behavior experiments, coupled with machine learning analysis, unlock valuable insights into complex systems by capturing diverse behavioral responses and deciphering hidden structures within high-dimensional datasets. I just completed a short introductory lecture on this topic, which is now available in the Teachings section.

Bioimage analysis with Napari

posted:
I’ve added new teaching material on using the free and open-source software (FOSS) Napari for bioimage analysis. Feel free to use and share it.

The Feynman problem-solving algorithm

posted:
Yet another problem-solving approach by Richard Feynman.

The Feynman method as an effective learning tool

posted:
The Feynman method can help you not only to remember new knowledge, but also to really and deeply understand it.

Opening a Jupyter notebook from GitHub in Binder: A step-by-step guide

posted:
Opening a Jupyter notebook from GitHub in Binder simplifies access to shared code and facilitates seamless collaboration. With just a few steps, you can launch and interact with Jupyter notebooks directly in your browser, without the need for complex setup procedures.

On teaching

posted: updated:
I strongly believe that teaching is not a unidirectional thing, but both sides, the participants and the teacher benefit from it. This is a personal comment on teaching.

New Teaching Material: Python Cheat Sheets

posted:
I’ve started a collection of various Python cheat sheets that contain some useful and commonly used commands and usage examples.

New Teaching Material: Statistical data analysis and basic time series analysis with Python

posted:
I’ve added two new tutorials in the teaching section on statistical data analysis and basic time series analysis with Python.

New Teaching Material: Analyzing IGOR binary files of patch clamp recordings

posted:
I’ve added a new tutorial in the teaching section on how to read and process IGOR binary files (ibw) of patch clamp recordings.

New Teaching Material: Fiji short course

posted: updated: