Questions tagged [spectral]

145 questions
34
votes
3 answers

Spectral Clustering a graph in python

I'd like to cluster a graph in python using spectral clustering. Spectral clustering is a more general technique which can be applied not only to graphs, but also images, or any sort of data, however, it's considered an exceptional graph clustering…
Alex Lenail
  • 12,992
  • 10
  • 47
  • 79
24
votes
4 answers

Changes of clustering results after each time run in Python scikit-learn

I have a bunch of sentences and I want to cluster them using scikit-learn spectral clustering. I've run the code and get the results with no problem. But, every time I run it I get different results. I know this is the problem with initiation but I…
user3430235
  • 419
  • 1
  • 4
  • 12
6
votes
3 answers

Reading zipped ESRI BIL files with Python

I have precipitation data from the PRISM Climate Group which are now offered in .bil format (ESRI BIL, I think) and I'd like to be able to read these datasets with Python. I've installed the spectral package, but the open_image() method returns an…
Jason Bellino
  • 494
  • 1
  • 6
  • 18
5
votes
1 answer

Spectral clustering using scikit learn on graph generated through networkx

I have a 3000x50 feature vector matrix. I obtained a similarity matrix for this using sklearn.metrics.pairwise_distances as 'Similarity_Matrix'. Now I used networkx to create a graph using the similarity matrix generated in the previous step as…
5
votes
1 answer

Memory efficient Python batch processing

question I wrote a small python batch processor, that loads binary data, performs numpy operations and stores the results. It consumes much more memory, than it should. I looked at similar stack-overflow discussions and would like to ask for further…
4
votes
2 answers

How to display hyperspectral image with SPy by python script not ipython?

when I use the script the window flashes and then disappears, so I just want to know how to make it stay for a long time? Thanks very much! you can get this python package form from spectral import * img = open_image('92AV3C.lan') view =…
Semie J
  • 41
  • 2
4
votes
2 answers

reading .img envi file with spectral python

I am trying to open an envi .img file and there is a .hdr file having same name. In the .img file there are two images which I can read using following code. from spectral import * img =…
M. M. Farhad
  • 39
  • 1
  • 7
4
votes
1 answer

How can I interpolate data represented in (r,spherical harmonic) space to a regular cartesian grid (F90)?

I'm trying to interpolate spherical harmonics to a cubic, Cartesian grid. The output data of my spherical, pseudo-spectral simulation has Nr radial levels between rMin and rMax, each containing a set of finite-order spherical harmonics for…
jvriesem
  • 1,859
  • 3
  • 18
  • 40
4
votes
1 answer

Gtk-WARNING **: Locale not supported by C library. while using several Python modules (mayavi, spectral)

I updated my MacBook to Mavericks, reinstalled Macports and all Python 2.7 modules I usually use. While running Python I get the following messages: when importing mlab: from mayavi import lab (process:1146): Gtk-WARNING **: Locale not supported by…
user3063903
  • 95
  • 1
  • 7
3
votes
1 answer

Cannot fit a MvNormal distribution with Distributions.jl. ERROR: PosDefException: matrix is not positive definite; Cholesky factorization failed

I'm trying to fit an MvNormal distribution to a matrix of spectral data, but I am getting the following error: Distributions.fit(MvNormal, myMatrix) > ERROR: PosDefException: matrix is not positive definite; Cholesky factorization failed. myMatrix…
3
votes
1 answer

How do you calculate the Affinity Matrix of an image?

I've been reading the formulas on how to compute the affinity matrix of an image and I'm a bit confused. Ideally, I would like to use color intensity as a distance metric. I found this reference:…
ct_
  • 1,189
  • 4
  • 20
  • 34
3
votes
1 answer

how do I see all the bands of an .hdr file generated by ENVI.

I am trying to list all the bands present in my .hdr file. I have more then 100 bands and it's a hyperspectral data. img = envi.open('Dun_Hyperion_Atm_Corr.hdr','Dun_Hyperion_Atm_Corr') view = imshow(img,(29,19,9)) It open the image but I want to…
Groot
  • 171
  • 13
3
votes
1 answer

Symmetric Fast Fourier Transform

I have vector s in R with values. I just used the function fft(s) to calculate the Fast Fourier Transform. Then I printed the values into where x is simple 1,...length(fft(s)). I see a strong symmetry here - why is that? I expected something…
Make42
  • 12,236
  • 24
  • 79
  • 155
3
votes
1 answer

How much matrix size the function Spectral clustering of Scikit learn can handle?

I am using function 'Spectral clustering' of scikit learn. I am able to perform clustering for 8100 by 8100 matrix but this function throws error for 10000 by 10000 matrix. Has anyone used this function for large matrix? edit: I got following error…
3
votes
3 answers

spectral clustering vs hierarchical clustering

Can anyone please explain that is there any advantage of using hierarchical clustering over spectral clustering? I know how they work but I want to know in which situations its better to use hierarchical clustering over spectral clustering.
starrr
  • 1,013
  • 1
  • 17
  • 48
1
2 3
9 10