The Machinery behind Machine Learning – Part 2

Machine Learning is one of the hottest topic on the web. But how do machines learn? And do they learn at all? The answer in most cases is: Machines do not learn, they optimize.
This is part 2 of the series, and after all the preparation it definitely is time to do the first numerical experiments. You can find the respective R code here.

(read more…)

Stefan Kühn

The Scala Type System: Parameterized Types and Variances, Part 3

With the help of co- and contravariance annotations in Scala you can derive relationships between parameterized classes from their type parameters. The compiler checks with specific rules how the type parameters are used in a generic class. In this, he checks if all uses of type parameters are legal, i.e. if the generic class is type safe.

Generic classes and co-/contravariant annotations are powerful tools that can be used on plentiful occasions when designing a class and while coding. However, where does it really makes sense to use these tools? This blog post presents my insights and my current opinion on this topic.

(read more…)

Andreas Schroeder

The Scala Type System: Parameterized Types and Variances, Part 2

What is the Scala type checker trying to say with the error message that a covariant type occurs in contravariant position? Which rules apply behind the scenes? How can these rules be explained by the known principle of subtype polymorphism? This post addresses this questions, not that the previous post has dealt with introducing type parameters and their variance annotations.

(read more…)

Andreas Schroeder