User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Introduction

A long time ago, when I was a PhD student, I wrote the book Global Optimization Algorithms – Theory and Application, which I published on my personal website as pdf. Since I recently developed the short course Metaheuristics for Smart Manufacturing and had a very nice experience teaching it, I have decided to begin to write a new book about optimization, "An Introduction to Optimization Algorithms," to incorporate my experience during the past ten years working in the field. When writing such a book, there are a couple of desirable features to improve the workflow and results, such as:

  • using a version control and distributed authoring system, which allows me to easily work on and extend the book as well as to make changes to the book and commit them wherever I am,
  • automated conversion of the book's sources to PDF, ideally whenever I commit a change,
  • automated provision of the PDF version of the book at an online location,
  • the generation of an electronic version of the book more suitable for handheld devises like mobile phones, i.e., an EPUB version, which should be automatically be built and provisioned like the PDF version,
  • maybe even the possibility that readers can file change requests, ask questions, or propose content to add in a structured way, and
  • the option to edit source code examples in an indepented repository and update the book whenever they change.

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

R is a powerful and efficient programming language for statistics, modeling, and data mining. Here I want to provide a quick note on the question "How do I get the name of a function in R?".

Consider the scenario where you write a function myFun in the form of <- function(f) { … } that accepts another function f as parameter and computes something. Maybe your computation takes a lot of time, so you want to output some logging information which contains the name of the function f as well, so the reader can see what is going on. Or maybe you want to generate a report with the results from several functions, so you want the "function names" to be the section titles of the report. Getting the name of a function (or any object) in R is actually quite tricky. Here I discuss a working approach.

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

Today, we published the first version of a new R package at github.com/thomasWeise/dataTransformeR for normalizing and transforming numerical data.

When we fit models to data, we often do not want to use the raw data as-is. Instead, we usually want to fit models to normalized or log-scaled versions of the data. If all data elements are in [0,1], this makes it easier to pick initial parameter values for models. If there are exponential relationships present in data sets, we may want to get rid of them by log-scaling the data. This means that, after the models have been fitted, we need to transform the model back by applying the inverse of the data transformation to the model.

This package uses our functionComposeR package to construct and apply such bijective transformations. The core of this package are the Transformation and TransformedData S4 classes and the routines to construct instances of them.

User Rating: 1 / 5

Star ActiveStar InactiveStar InactiveStar InactiveStar Inactive

Today, we published the first version of a new R package at github.com/thomasWeise/functionComposeR for composing and canonicalizing functions. When we combine functions in R in the form of g(f(x)), we have the problem that the result is rarely human readable. This results from two problems. The first problem is that variables inside the function are evaluated in the environment of the function and even if they are constants, they will remain as variables. Thus, when printing a function f(x), I may sometimes something like a k*x inside, but may not know the value of k, even though it may be perfectly known in the function's environment and a constant. The second problem is that this also applies to nested functions, so there may be something like f=function(x) x+g(x) where g is a well-defined function, but printing f will not reveal the nature of g. Both of these issues also make evaluating the functions slower, as we could resolve the variables to constants and inline the nested functions' bodies, but instead evaluate them as variables and function calls, respectively. With our new package, we try to solve all of these issues at once. We provide a tool for combining functions and one for canonicalizing functions, i.e., for resolving all resolve-able components of a function.

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

If you do not live in an English-speaking country, your language will make use of all sorts of odd characters, such as "ä", "ö", "ü", and "ß" in German or "你" and "我" in Chinese. Of course, you intend that such characters, if used in your web page, blog posts, or text files, come out correctly on the screen of your readers. In my course on Distributed Computing, there actually is a lesson on text encoding, but I can only briefly touch the topic there. Here I just want to summarize it a bit more comprehensively.

feed-image rss feed-image atom