Skip to content

Instantly share code, notes, and snippets.

@ahwillia
ahwillia / tensorflow_pca.py
Created October 27, 2016 07:25
PCA in TensorFlow
import numpy as np
import tensorflow as tf
# N, size of matrix. R, rank of data
N = 100
R = 5
# generate data
W_true = np.random.randn(N,R)
C_true = np.random.randn(R,N)