Git Product home page Git Product logo

dmaps's People

Contributors

hsidky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dmaps's Issues

Question on re-weighting biased data

Hi, in the README.md, it's mentioned that the package is able to re-weight the kernel for biased input. I wonder how to use that feature since it's not mentioned in the README.

I also can't find the "example folder" that's mentioned in the README. The link to the blog that's mentioned in other issues is also down. Also, is the reweighting scheme the same as the umbrella integrated dmap paper?

How to set adequate kernel bandwith

Hello,

I'm trying to use your C++ implementation of Diffusion Maps with some of my data, which is really big (37k x 60k matrix). In readme you select the kernel bandwith as 3. How can I properly select a kernel bandwith on my data?

Best!
Davi

Basic example: need some clearing explanations

Hello and thank you for providing access to your library!
I have been playing around with python version of the library, trying to figure out how it works and repeating the basic example; It seems to be that I am doing something wrong, but I cannnot figure out what as the resulting diffusion map is definately not right. I will be gratefull if you could explain where I am mistaken.
Thank you!

Here is the code:

import dmaps
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

length_phi = 12
length_Z = 12
sigma = 0.1
m = 10000

phi = length_phi * np.random.rand(m)
xi = np.random.rand(m)
Z = length_Z * np.random.rand(m)
X = 1./6 * (phi + sigmaxi) * np.sin(phi)
Y = 1./6 * (phi + sigma
xi) * np.cos(phi)

swiss_roll = np.array([X, Y, Z]).transpose()
print(swiss_roll.shape)

dist = dmaps.DistanceMatrix(swiss_roll)
dist.compute(metric=dmaps.metrics.euclidean)
dist.save('distMetr.jpeg')

diffMap = dmaps.DiffusionMap(dist)
diffMap.set_kernel_bandwidth(3)
diffMap.compute(3)

v = diffMap.get_eigenvectors()
w = diffMap.get_eigenvalues()

plt.rcParams["figure.figsize"] = (8, 12)
fig = plt.figure()
Axes3D
ax = fig.add_subplot(211, projection='3d')
ax.scatter(swiss_roll[:, 0], swiss_roll[:, 1], swiss_roll[:, 2], c=swiss_roll[:, 1], cmap=plt.cm.get_cmap("Spectral"))
ax.set_title("Original data")

ax = fig.add_subplot(212)
arr0 = ax.scatter(v[:, 1]/v[:, 0], v[:, 2]/v[:, 0], c=swiss_roll[:, 1], cmap=plt.cm.get_cmap("Spectral"))
plt.xlabel('$\Psi_2$')
plt.ylabel('$\Psi_3$')
plt.title('Projected data')
plt.show()

result1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.