-
Notifications
You must be signed in to change notification settings - Fork 15
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
Kepler Mapper returns an empty graph #26
Comments
There is a special undocumented option I added awhile back to help shift the cover bins a bit, so that points near the boundaries were accounted for properly. See cover = optimize_cover(
X, r=15, g=0.67,
scale_r=not True,
scale_limits=True
) The corresponding code is defined in dyneusr/mapper/utils.py, see e.g., # Define optimized limits
limits = None
if scale_limits is True:
offset = p_overlap / float(n_cubes)
limits = [[-offset, 1+offset] for _ in range(ndim)]
n_cubes += 2 #* ndim Not 100% sure why this doesn't work with Edit: To clarify, when I use |
For more context, when I use >>> cover.limits
array([[-0.04466667, 1.04466667],
[-0.04466667, 1.04466667]]) >>> cube_centers = cover.fit(lens)
>>> cube_centers
[array([-0.01262745]),
array([0.05145098]),
array([0.11552941]),
array([0.17960784]),
array([0.24368627]),
array([0.30776471]),
array([0.37184314]),
array([0.43592157]),
array([0.5]),
array([0.56407843]),
array([0.62815686]),
array([0.69223529]),
array([0.75631373]),
array([0.82039216]),
array([0.88447059]),
array([0.94854902]),
array([1.01262745])] >>> hyper_cubes = cover.transform(lens, cube_centers)
>>> [_.shape for _ in hyper_cubes]
[(3, 2),
(2, 2),
(1, 2),
(1, 2),
(1, 2),
(2, 2),
(2, 2),
(3, 2),
(3, 2),
(4, 2),
(4, 2),
(4, 2),
(3, 2),
(2, 2),
(1, 2)] and when I use >>> cover.limits
None >>> cube_centers = cover.fit(lens)
>>> cube_centers
[array([-17.97072105]),
array([-15.59127478]),
array([-13.2118285]),
array([-10.83238223]),
array([-8.45293595]),
array([-6.07348968]),
array([-3.6940434]),
array([-1.31459713]),
array([1.06484915]),
array([3.44429542]),
array([5.82374169]),
array([8.20318797]),
array([10.58263424]),
array([12.96208052]),
array([15.34152679])] >>> hyper_cubes = cover.transform(lens, cube_centers)
>>> [_.shape for _ in hyper_cubes]
[(26, 2),
(40, 2),
(48, 2),
(47, 2),
(47, 2),
(46, 2),
(50, 2),
(58, 2),
(60, 2),
(56, 2),
(49, 2),
(47, 2),
(51, 2),
(50, 2),
(32, 2)] So it seems to me like it has to do with the scaling of these limits or the lens itself. |
@kristiandroste looping you in here |
Thanks @calebgeniesse! The notebook runs start to finish without catching any errors when I use The shapes of my
at the end of cell 12 yields
Also, the output from cell 11 shows that I'm getting the same shape of
Comparing this to the shapes listed in the screenshot of the output in the DyNeuSR Notebooks repo, it appears that this shape is correct for subject 1, but the other five subjects should have different shapes for Visualization of mapper (cell 14), heatmaps (cell 16), and TCM visualizations in step 6 all differ from the output in the DyNeuSR Notebooks repo |
See PR 24 for reports relating to an issue with
kmapper
. Several different reported errors were found to be due to an empty graph being returned bykmapper
. These errors were only observed in 02_haxby_fmri.ipynb, a notebook in DyNeuSR Notebooks repository. See below for more notes taken from PR 24, which has since been merged for other reasons.The text was updated successfully, but these errors were encountered: