Cluster Hyperspectral Images in Orange Orange has a hyperspectral dataset called &quot;liver cirrhosis&quot; and you can visualize the hyperspectral image using the hyperspectral image widget. However, I would like to perform various clustering methods e.g. k-means on the spectra at each pixel and then display those clusters on the hyperspectral image widget like in this photo

does anyone know how to do this kind of analysis?
As a first step, You can take the table of measurements as-is, run k-means on all the columns representing intensities.
In the image, I see pixels in 5 colors (red, orange, green, azure, magenta), so the author of the top image has decided to run k-means with k=5 clusters. (k in in k-means is often chosen to be an odd number)
To get a clearer signal, people often run preprocessing steps such as Principal Components analysis (PCA) on their datasets before running k-means, and then choose the first, say, 10 components (should be larger than 5). Then people run k-means on those 10 columns.
Choosing the number of components to calculate k from, and then choosing a value for k, is basically guesswork, at least initially.
It is also guesswork to assign colors to cluster numbers found by the k-means algorithm.
So you probably have to set a lookup table manually, in another preprocessing step, such as
{
1 =&gt; &quot;red&quot;.
2 =&gt; &quot;azure&quot;,
3 =&gt; &quot;limegreen&quot;
4 =&gt; &quot;yellow&quot;,
5 =&gt; &quot;orange&quot; }. And then make an x-y plot coloring the pixels accordingly. The sequence is arbitrary.
Sorry, I don't know how to do this in Orange.