Previous: lapack exceptions, Up: lapack


D.10.3 Additional lapack notes

The functions dgesdd and zgesdd are an effective dimensionality reduction technique for a large database of time series. A set of basis vectors can be computed once for the database, and then any time series in the database can be expressed as a linear combination thereof. To the extent that the data embody any redundant information, an approximate reconstruction of an individual series from the database will require fewer coefficients (maybe far fewer) in terms of the basis than original length of the series.

The library functions dgelsd and zgelsd are good for finding least squares fits to empirical data. If the matrix parameter a is interpreted as a list of inputs and the vector parameter b as the list of corresponding output data from some unknown linear function of n variables f, then x is the list of coefficients whereby f achieves the optimum fit to the data in the least squares sense.

These functions solve a special case of the problem solved by dggglm and zggglm where the parameter B is the identity matrix. For the latter functions, the output vector y can be interpreted as a measure of the error, and B can be chosen to express unequal costs for errors at different points in the fitted function.

Cholesky decompositions obtained by dpptrf and zpptrf are useful for generating correlated random numbers. A population of vectors of uncorrelated standard normally distributed random numbers can be made to exhibit any correlations to order by multiplying all of the vectors by the lower Cholesky factor of the desired covariance matrix.