February 2019
Intermediate to advanced
386 pages
9h 54m
English
In this example, we will use the dataset defined in the example of a Sanger's network, in order to perform principal component extraction using the Rubner-Tavan's network. For our convenience, let's recompute the eigendecomposition:
import numpy as npQ = np.cov(Xs.T)eigu, eigv = np.linalg.eig(Q)print('Eigenvalues: {}'.format(eigu))print('Eigenvectors: {}'.format(eigv.T))
The output of the previous snippet is as follows:
Eigenvalues: [12.01524122 28.99783723]Eigenvectors: [[-0.79948496 0.60068611] [-0.60068611 -0.79948496]]
We can now initialize the hyperparameters, as follows:
n_components = 2learning_rate = 0.0001max_iterations = 1000stabilization_cycles = 5threshold = 0.00001W = np.random.normal(
Read now
Unlock full access