peal.sparse_dictionaries.orthogonal_procrustes_dictionary.OrthogonalProcrustesDictionaryConfig¶
- class peal.sparse_dictionaries.orthogonal_procrustes_dictionary.OrthogonalProcrustesDictionaryConfig[source]¶
Bases:
SparseDictionaryConfigConfig of
OrthogonalProcrustesDictionary.- Parameters:
n_components (
intorNone) – Number of output directionsK.Noneinfers it from the targets (number of columns of a multi-hotyormax(y) + 1for indices).sparse_dictionaries_type (
str) – Fixed to"OrthogonalProcrustesDictionary"for the factory.ending (
str) – File ending of the saved weights.task (
dictorNone) –TaskConfigfields applied to the datasets while extracting features, sobatch[1]yields the attributes to fit on.orthogonal (
bool) –Truesolves the orthogonal Procrustes problem (one orthonormal set of atoms);Falsefits each attribute direction independently as the unit-norm class-mean-difference direction. See the attribute note below for why the free fit is preferable with many attributes.
Methods
Attributes
fit every attribute direction on its own (the row of the cross-covariance Y^T X, i.e. the class-mean-difference direction, unit norm) instead of one orthonormal set.
- orthogonal: bool = True¶
fit every attribute direction on its own (the row of the cross-covariance Y^T X, i.e. the class-mean-difference direction, unit norm) instead of one orthonormal set. Orthonormality distorts the atoms once K is large: with 40 CelebA attributes the orthogonal Male atom has cosine 0.61 to the Male atom of the 2-attribute fit, and its edit flips the student 14% of the time where the 2-attribute atom flips 59% (2026-09-14). The 2-attribute fit is unaffected either way.
- Type:
False