A method of operating a hearing aid system comprising the steps of: - providing an adaptive filter with N adaptive filter coefficients; - providing a first set of input signal samples; - providing at least M recent second signal samples representing a desired signal; - filtering the first set of signal samples in the adaptive filter, in accordance with the formula: d n = X n w n T + ε, wherein d n is a vector comprising the at least M recent second signal samples representing the desired signal, wherein w n is a vector holding the adaptive filter coefficients, wherein X n is a matrix comprising the first set of input signal samples, wherein ε represents noise and wherein n is a time index, - selecting a posterior distribution given by p ( w n | w n-1, d n); - determining an optimum setting of the adaptive filter coefficients as the setting that maximizes the posterior distribution by using the closed form expression given below: w n = B w n − 1 + I − B μ + A X n T I + X n A X n T d − X n I − B μ − X n B w n − 1 wherein A = 1 σ 2 Σ − 1 + K − 1 − 1, B = Σ K + Σ − 1 wherein the first set of input signals in the matrix X n is defined by M vectors that each holds N recent input signal samples given as: X n = x n ⋯ x n − N − 1 ⋮ ⋱ ⋮ x n − M − 1 ⋯ x n − M − N − 2 wherein σ 2 represents the variance of the noise ε; wherein K is a transition covariance matrix that is configured to control how much the adaptive filter coefficients may change from time sample to time sample; wherein ∑ is a prior covariance matrix that is configured to limit the set of available filter coefficient vectors in order to avoid undesirable filter coefficient vectors; and wherein μ is a vector that represents the prior mean of the adaptive filter coefficients and is configured to limit the set of available filter coefficient vectors in order to avoid undesirable filter coefficient vectors; and - selecting the optimum setting of the adaptive filter coefficients when updating the adaptive filter. - providing an adaptive filter with N adaptive filter coefficients; - providing a first set of input signal samples; - providing at least M recent second signal samples representing a desired signal; - filtering the first set of signal samples in the adaptive filter, in accordance with the formula: d n = X n w n T + ε, wherein d n is a vector comprising the at least M recent second signal samples representing the desired signal, wherein w n is a vector holding the adaptive filter coefficients, wherein X n is a matrix comprising the first set of input signal samples, wherein ε represents noise and wherein n is a time index, - selecting a posterior distribution given by p ( w n | w n-1, d n); - determining an optimum setting of the adaptive filter coefficients as the setting that maximizes the posterior distribution by using the closed form expression given below: w n = B w n − 1 + I − B μ + A X n T I + X n A X n T d − X n I − B μ − X n B w n − 1 wherein A = 1 σ 2 Σ − 1 + K − 1 − 1, B = Σ K + Σ − 1 wherein the first set of input signals in the matrix X n is defined by M vectors that each holds N recent input signal samples given as: X n = x n ⋯ x n − N − 1 ⋮ ⋱ ⋮ x n − M − 1 ⋯ x n − M − N − 2 wherein σ 2 represents the variance of the noise ε; wherein K is a transition covariance matrix that is configured to control how much the adaptive filter coefficients may change from time sample to time sample; wherein ∑ is a prior covariance matrix that is configured to limit the set of available filter coefficient vectors in order to avoid undesirable filter coefficient vectors; and wherein μ is a vector that represents the prior mean of the adaptive filter coefficients and is configured to limit the set of available filter coefficient vectors in order to avoid undesirable filter coefficient vectors; and wherein the first set of input signals in the matrix X n is defined by M vectors that each holds N recent input signal samples given as: X n = x n ⋯ x n − N − 1 ⋮ ⋱ ⋮ x n − M − 1 ⋯ x n − M − N − 2 wherein σ 2 represents the variance of the noise ε; wherein K is a transition covariance matrix that is configured to control how much the adaptive filter coefficients may change from time sample to time sample; wherein ∑ is a prior covariance matrix that is configured to limit the set of available filter coefficient vectors in order to avoid undesirable filter coefficient vectors; and wherein μ is a vector that represents the prior mean of the adaptive filter coefficients and is configured to limit the set of available filter coefficient vectors in order to avoid undesirable filter coefficient vectors; and - selecting the optimum setting of the adaptive filter coefficients when updating the adaptive filter.