Some initial code to do em pca
more changes
more changes
allow for missing data
minor updates