Risks, rewards, and types of learning

Until now we have given a fairly rosy picture of machine learning as a programming abstraction that transfers effort from us as programmers to the machine. Let us now expose and explore some of the risks, and then continue with the rewards.

Risks in learning

Learning amounts to, in essence, generalising to the unknown based on presented examples.

While in a great many cases such generalisations are successful and serendipitous, generalisations into the unknown also feature uncertainty because we are dealing with the unknown.

Example. A turkey is regularly fed by its owner. The turkey naturally expects feeding to take place when the owner arrives carrying an axe.

Example 2. Even if we have agreed that we will only work with handwritten binary digits, what if the user has drawn an X with red ink instead of a 0 or 1 with black ink?

In short, generalisations into the unknown by necessity come with uncertainty and unforeseen errors, for example, due to less than comprehensive examples or poor learning.

When relying on generalisations to the unknown, it is important to make sure that the basis for generalisations (the set of presented examples) comprehensively reflects the situations that may arise. Furthermore, one needs to prepare for errors and validate learning.

One should also recognise the possibility that catastrophic errors may arise even if validation indicates perfect accuracy and we have put in our best effort and all of our experience to construct a comprehensive set of examples. (Think about the poor turkey and its limited experience.)

Serendipity of learning

As long as one minds and understands the risks, machine learning is a powerful tool in a programmer’s toolkit.

In fact, machine-learning techniques can be applied in cases where we as programmers do not fully understand the data we are working with, and hence it would be essentially impossible to program a solution. Yet machine-learning techniques (such as simple nearest-neighbour classification) can still be applied, of course with the understanding that errors can and do happen.

What is more, with ever increasing amounts of data available, machine-learning techniques are becoming increasingly important and increasingly easy to apply.

Types of learning techniques

Machine learning seeks to make useful generalisations from data (presented examples).

Perhaps the two main classes of learning techniques are

  • supervised techniques that rely on auxiliary labels associated with the presented examples to articulate the regularity that needs to be learnt, and

  • unsupervised techniques that work with the presented examples as is, seeking to identify useful features in the data and/or to summarize the data.

For example, we have studied the identification of handwritten binary digits as a supervised problem where it was assumed we ourselves as programmers have labelled the data. (Or at the very least that we have used some auxiliary program to carry out the labelling.)

Alternatively we could have used unsupervised techniques to study the digit data. For example, we could have used unsupervised clustering techniques on the data.

Remark. (*) For example, k-means clustering is an easy approach to implement and test. You are welcome to try it out on the handwritten digits. (*)

Alternatively to the division into supervised and unsupervised techniques, we can divide machine learning techniques into techniques that

  • rely on probabilistic modeling (such as generative and discriminative models) in their operation, and

  • do not have a direct probabilistic interpretation and rely on more ad hoc ideas.

Remark. Nearest-neighbor classification can be viewed as an ad hoc tool without a direct probabilistic interpretation.

Remark 2. In the exercises we will develop a simple Bayesian probabilistic model for classification.