We consider a problem that arises in the field of frequency domain system identification. If a discrete-time system has an input-output relation Y (z) = G(z)U (z), with transfer function G, then the problem is to find a rational approximationĜ n for G. The data given are measurements of input and output spectra in the frequency points z k : {U (z k), Y (z k)} N k=1 together with some weight. The approximation criterion is to minimize the weighted discrete least squares norm of the vector obtained by evaluating G −Ĝ n in the measurement points. If the poles of the system are fixed, then the problem reduces to a linear least squares problem in two possible ways: by multiplying out the denominators and hide these in the weight, which leads to the construction of orthogonal vector polynomials, or the problem can be solved directly using an orthogonal basis of rational functions. The orthogonality of the basis is important because if the transfer functionĜ n is represented with respect to a non-orthogonal basis, then this least squares problem can be very ill conditioned. Even if an orthogonal basis is used, but with respect to the wrong inner product (e.g., the Lebesgue measure on the unit circle) numerical instability can be fatal in practice. We show that both approaches lead to an inverse eigenvalue problem, which forms the common framework in which fast and numerically stable algorithms can be designed for the computation of the orthonormal basis.