-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diffusion Map Refactor/Implementation #863
Conversation
Should parallelization be something we do in another PR or should we tackle it in this? |
@@ -63,6 +63,7 @@ Fixes | |||
|
|||
Changes | |||
|
|||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge conflicts left over from rebasing
Great I'll have a look at it soon. |
@kain88-de, I still need to update tests so you can let it wait a bit. Decrementing loop in single frame is a simple fix to make sure that all frames are hit in run method. At first, a normal doubly nested loop would stop after one _single_frame call because self._ts would increment every time the j_th trajectory frame was accessed. (I don't know if what I just said made any sense but it was a funky little problem) |
@jdetle is this ready for a final review? |
No, tests are passing but I had some conversations with @euhruska and there are some things that I need to make more clear in the docs. I'll have something up tomorrow with fixed docs and more tests. |
Style and such is satisfactory for me, need more tests to address coverage. I will get on it after school hours. |
This is ready for a review. |
I found a bug and I believe it has to do with the fact that eigenvectors and eigenvalues are not unique, when running |
Are you saying for an eigenvector v_i you are seeing in two different runs v_i == -v_i? |
No, I am saying I am seeing the jth coordinate of v_i equal to the the -jth On Mon, Jun 6, 2016 at 2:14 PM kain88-de [email protected] wrote:
|
4723d6a
to
6d80248
Compare
@kain88-de, @richardjgowers, these failures are a pain. @richardjgowers, @dotsdl, will splitting up new tests for #363 help to fix this problem? Is there a way I can hit the ground running and help out? |
I just restarted the failing travis build. It complained about timeout errors. Can we just remove timeouts in nose? |
I think the failures are caused by file I/O problems, so not really a 363 thing. |
# will only run if distance matrix not already calculated | ||
self._dist_matrix.run() | ||
self._scaled_matrix = self._dist_matrix.dist_matrix / self._epsilon | ||
# this should be a reference to the same object as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure when this comment used to make sense/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relic of Epsilon class, would permanently change dist_matrix.dist_matrix to reflect scaling. There weren't two matrices in memory.
Changes Unknown when pulling aa22772 on jdetle:diffusion into * on MDAnalysis:develop*. |
Changes Unknown when pulling aa22772 on jdetle:diffusion into * on MDAnalysis:develop*. |
unneccesarily exponentiating a diagonalizable matrix. Removed timescaling init, removed tests for anisotropic kernel and timescaling.
Changes Unknown when pulling 97c3105 on jdetle:diffusion into * on MDAnalysis:develop*. |
eigenvals, eigenvectors = np.linalg.eig(self._kernel) | ||
D_inv = np.diag(1 / self._kernel.sum(1)) | ||
self._diff = np.dot(D_inv, self._kernel) | ||
eigenvals, eigenvectors = np.linalg.eig(self._diff) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you say it's better to use eigh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did and apparently I may have been wrong, the two give different results:
Eigenvalues using epsilon = 5, eigh:
[ 1.02532315 0.63865029 0.50461156 0.46652167 0.43577238 0.33804695
0.29255447 0.23455876 0.2047588 0.18443111 0.14899126 0.14097275
0.12780406 0.11636266 0.11326329 0.11052915 0.10414109 0.10212337
0.09150211 0.08408036]
Eigenvalues using epsilon = 5, eig:
[ 1. 0.69843825 0.51574675 0.47646882 0.40558677 0.3209098
0.25232349 0.21522759 0.20871485 0.17725692 0.14328863 0.13184095
0.11912811 0.11392278 0.10615283 0.10202534 0.10149993 0.09744823
0.08432603 0.07256051]
Given that the first eigenvalue should be 1 I am weary of using eigh
Strange but yeah we should stick with the normal eig function then. |
Changes Unknown when pulling b3b2ce9 on jdetle:diffusion into * on MDAnalysis:develop*. |
There are still some comments left to address. Can you say when you are done with them. |
I think I lost track of them! I will look for them here, but in the mean time I opened up a new PR to help with the final pieces. |
Fixes #857
Changes made in this Pull Request:
TODO:
PR Checklist