-
The kernel trick
A support vector machine can find values of such that the hyperplane (i.e. line, but in more dimensions) given by seperates a (linearly seperable) dataset such that all points above the line are in class A and all points below the line are in class B. The key feature of the SVM is that of…
-
BIO 2021 question 1
Note: you can find the question paper on the BIO website Part A This problem can be solved simply using a recursive algorithm: function is_pat(string: String) -> bool if string.len() == 1 then return True else is_pat = False for i=0 to string.len() – 2 do let (first_half, second_half) = string.split_at(i) if NOT min(first_half) >…
-
Constraint-based type Inference
I have always found the explanations of type inference in the PL (programming language) literature to be at a very abstract level. This is fine, but I found it much easier to understand the underlying mechanisms by looking at more concrete examples. The basic problem of type inference is this: we don’t want to make…