Inverse Problem (Part 3)

In the two previous posts I wrote about inverse problems (part 1 and part 2). For a proper introduction into inverse problems I refer to these posts. In my last post about inverse problems, I have showed you how to describe a prediction (classification problem) in terms of an inverse problem and how to solve

Data science complexity and solutions in real industrial projects

As data scientists we usually like to apply fancy machine learning models to well-groomed datasets. Everyone working on industrial problems will eventually learn, that this does not reflect reality. The amount of time spent on modeling is small compared to data gathering, -warehousing and -cleaning. Even after training and deployment of the model, the work

Inverse Problem (Part 2)

In the last post I have written about inverse problems. A simplified toy example was presented, which showed you how to translate this problem into an optimization problem. Optimization problems can be solved with multiple algorithms, e.g. gradient descent or evolutionary algorithms. This article presents a more sophisticated inverse problem. We want to classify images

Inverse Problem (Part 1)

The process of calculating the causal factors from an observation is called inverse problem. An inverse problem is much harder to solve than the corresponding forward counterpart, which is calculating the observation from the causal factors. Many problems in science and math are inverse problems. They can be found in optics, radar, acoustics, communication theory,

Image deblurring (Part 2)

This article is a follow up to my last article Image debluring (Part 1). There I wrote about the specific problem of image deblurring. The problem is to find the original image, which is convolved with a known point spread function. This can be solved with an interactive optimization procedure. My intention to write about

Image deblurring (Part 1)

Image deblurring is the process of removing artifacts from images. An out of focus camera or movement during the exposure can cause these artifacts. This is often modeled as a convolution of the undistorted image with a point spread function. Deblurring is the inversion of this model. Inverse problems are often solved in an iterative

How to use pytest in automatic code generation

This notebook shows you how to write a plugin for Pytest. This allows us to use the pytest functionaltiy, e.g. test-discovery, in our automatic programming scenario. Another advantage is that many developers are already familar with pytest. Therefor, it would be much easier for those people to apply this development technique. We have seen in

Latex with Jinja2

Jinja2 is a templating engine for python. It is mostly known in combination with the micro web service Flask. However, it can not only be used to modify HTML files, but all sort of text files. Here I want to show you how to use Jinja2 in combination with Latex. Latex allows you to create

Abstract Syntax Tree

This blog post follows my introductory post to Automatic programming. The syntax of a programming language is defined as the set of rules that defines correctly structured code. There are many possible syntax errors. Some examles are: Opened parantheses are not closed Indendations are not correct Variable names are written wrong It is hard to

Automatic programming

Automatic programming is a type of computer programming with the goal to generate a computer program. This allows the programmer to write the code in a more abstract way. It can be something like switching to a higher level programming language, which compiles to a lower level language or programming declaratively. Declarative programming  is any