1. A method for transforming a feature vector comprising a first and a second feature represented by a first and a second feature value, respectively, into a feature code using an encoder, said feature code usable in an algorithm and having a predetermined number of bits, said method comprising the steps of: determining for each of the first and the second features the performance as a function of the length of the feature code; and using this dependency between the performance and the feature code length for each of the individual features derived in the step of determining to find feature code lengths for the first and the second features in such a way that the sum of the bit length of the first and the second feature codes has a length equaling said predetermined bit length.