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.

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

Sometimes, I come across the need for creating temporary files in my (Java) programs. For this purpose, I usually use Java's NIO with the Path API instead of the old File API. Here I discuss how a directory for temporary files further be scoped in time with Java's try-with-resources.

feed-image rss feed-image atom