Updated PCA to use SVD. #1527

Merged
merged 34 commits into from Dec 19, 2016

Projects

None yet

5 participants

@rcorbish
Contributor

Added/updated 4 methods

  • pca - return the reduced dimension feature set
  • pca_factor - return the factor by which to multiply a feature set to reduce the features

Each has two versions,

  • nDims indicate the number of dimensions in the projected feature set
  • variance select an amount of variance to keep in the projected feature set

Added a test case

@SusanBot

Build triggered. sha1 is merged.

@SusanBot

Build started sha1 is merged.

@SusanBot

Build triggered. sha1 is merged.

@saudet
Member
saudet commented Dec 19, 2016

Great! Is this ready to merge?

@SusanBot

Build finished. 921 tests run, 20 skipped, 3 failed.

@SusanBot

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/498/

Build result: ABORTED

[...truncated 2.78 MB...] at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404)Caused by: java.io.FileNotFoundException: https://api.github.com/repos/deeplearning4j/nd4j/statuses/e540fe0bb6dc0449fe2745c67de28a184e79cc18 at sun.reflect.GeneratedConstructorAccessor41.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1890) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1885) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1884) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1457) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at org.kohsuke.github.Requester.parse(Requester.java:524) at org.kohsuke.github.Requester._to(Requester.java:251) ... 12 moreCaused by: java.io.FileNotFoundException: https://api.github.com/repos/deeplearning4j/nd4j/statuses/e540fe0bb6dc0449fe2745c67de28a184e79cc18 at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338) at org.kohsuke.github.Requester.parse(Requester.java:514) ... 13 more

@SusanBot

Build started sha1 is merged.

@SusanBot

Build finished. 1866 tests run, 39 skipped, 10 failed.

@rcorbish
Contributor

I can't see what the test failure is - can someone post it please.

@SusanBot

Build triggered. sha1 is merged.

@saudet
Member
saudet commented Dec 19, 2016

This one?

Error Message

Reconstructed matrix is very different from the original. expected:<0.0> but was:<-0.20078253746032715>

Stacktrace

java.lang.AssertionError: Reconstructed matrix is very different from the original. expected:<0.0> but was:<-0.20078253746032715>
	at org.nd4j.linalg.dimensionalityreduction.TestPCA.testFactorDims(TestPCA.java:49)

Standard Output

o.n.l.BaseNd4jTest - Running org.nd4j.linalg.dimensionalityreduction.TestPCA on backend org.nd4j.linalg.cpu.nativecpu.CpuBackend
o.n.n.Nd4jBlas - Number of threads used for BLAS: 4
o.n.l.BaseNd4jTest - Ending org.nd4j.linalg.dimensionalityreduction.TestPCA
@SusanBot

Build started sha1 is merged.

@SusanBot

Build finished. 1868 tests run, 39 skipped, 9 failed.

@saudet
Member
saudet commented Dec 19, 2016

Seems to be fixed, good to go?

@agibsonccc
Member

I would be fine with merging this if you are.

@saudet saudet merged commit 53bff36 into deeplearning4j:master Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment