 Today, I will demonstrate how to find groups of spectra in a dataset. Essentially, I want to do clustering, and the technique I will use is principal component analysis, PCA. We will use the liver dataset from datasets widget. Open datasets, type liver in the filter, select the data, and remember to press send data. Now, we can observe our data with the spectra widget. I can see my spectra nicely plotted, and there are some features that distinguish them. In real life, the spectra would probably be much harder to distinguish visually, but now we will use this nicely designed dataset for our demonstration. Now, the question is whether these spectra form meaningful groups. We will use PCA to transform our spectral data into a low-dimensional space. PCA transformation is a bit special for spectroscopy. In most datasets in orange, attributes are assumed to be independent, so normalizing them would help. In spectroscopy, however, columns are related to each other, so normally, we would want to keep the data as they are. This means we will have to turn off the normalize data option in PCA. Now, let's drag the cutoff until we cover 99% of variance, which in our case corresponds to 8 principal components. If I connect PCA to scatterplot, each spectrum is represented by a dot. For demonstration, we will remove the class colors. By default, PC1 versus PC2 is plotted, and it already shows quite some promise. I can also try other combinations. PC2 versus PC3 also looks interesting. But let's go back to PC1 and PC2. One group clearly stands out from the rest. Let us inspect it. Select the group of points in the lower left quadrant in the scatterplot and connect the widget to spectra. Now, the spectra widget will show spectra corresponding to the previously selected data points in black and the rest of the data in gray. This is even clearer if we plot the group averages by selecting it from the menu or simply pressing A. Let's go back to the individual view by pressing A again. Great! We have just discovered a special group in our data. But does this grouping have any particular meaning? As a matter of fact, yes. There are predefined labels in the data, and the selection corresponds almost completely to the glycogen group, which was identified by a spectroscopist. If you press C or color by type using the menu, you will see the predefined classes and the correspondence of our selection with them. Now you know how to find groups of data using the PCA preprocessing and how to display them in a graph.