In this recipe, you will learn how to compute a rank-considerant matrix approximation. The problem is formulated as an optimization problem. Given an input matrix, the aim is to find its approximation where the fit is measured using the Frobenius norm and the rank of the output matrix should not be greater than the given value. This functionality, among other fields, is used in data compression and machine learning.
Rank-constrained matrix approximation
Getting ready
Before you proceed with this recipe, you need to install the OpenCV 3.0 (or greater) Python API package.