PCA
PCA is one of the most popular dimensionality reduction algorithms and it has a couple of implementations in the Dlib library. There is the Dlib::vector_normalizer_pca type, for which objects can be used to perform PCA on user data. This implementation also normalizes the data. In some cases, this automatic normalization is useful because we always have to perform PCA on normalized data. An object of this type should be parameterized with the input data sample type. After we've instantiated an object of this type, we use the train() method to fit the model to our data. The train() method takes std::vector as samples and the eps value as parameters. The eps value controls how many dimensions should be preserved after the PCA has been transformed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access