1. A method of assigning a test pattern to a class chosen from a predefined set of classes, comprising: calculating a class membership probability for said test pattern; calculating a confidence interval for said class membership probability based upon a number of training patterns in a neighbourhood of said test pattern in a feature space; wherein said number of training patterns in the neighbourhood of the test pattern is obtained from computing a convolution of a density function of said training patterns with a Gaussian smoothing function centred on said test pattern, said density function of the training patterns being represented as a mixture of Gaussian functions.