library(archeospec) # Set a seed value to ensure reproducibility set.seed(934587)
The package includes a small set of signatures called signatures
. Load the data
# Loading data data(signatures)
Let's see the information of the signatures
print(signatures) summary(signatures) is.spectral(signatures)
We can filter signatures in three different ways:
1. We have used three different sensors for different wavelengths. The change of sensor introduces some error, which can be corrected by smooth_leaps
function: just tell the first wavelength of each sensor (but the first one).
2. The lowest wavelengths might include more noise than the rest of the measures. We can filter out the lower wavelengths by using remove_head
.
3. The highest wavelengths might include more noise than the rest of the measures. We can filter out the higher wavelengths by using remove_tail
.
signatures <- smooth_leaps(signatures, leaps=c(1001, 1831)) signatures <- remove_head(signatures, head=400) signatures <- remove_tail(signatures, tail=2400)
We can see the simple plots like signatures and intracorrelation among wavelengths.
plot_signatures(signatures) plot_intracorrelation(signatures)
If we are not sure aboud the possible number of endmembers, we can use the plot_elbow
to check the K-Means intercluster error
for different number of groups (k
). For report purposes, we might want to select a specific value of k
in the plot.
plot_elbow(signatures, k=2:4, selected=3)
Apply VCA to compute the endmembers using k=2
. Then, apply K-Means clustering using a number of clusters k=3
.
signatures <- unmixing_vca(signatures, k=2) signatures <- clustering_kmeans(signatures, k=3)
See information of VCA in tabular format
table_endmembers(signatures) table_residuals_summary(signatures) table_weights(signatures)
See information of VCA and K-Means as plots
plot_endmembers(signatures) plot_clusters(signatures) plot_mutualinfo(signatures) plot_endmember_cluster(signatures) plot_endmember_density_bar(signatures) plot_endmember_density_box(signatures) plot_residuals(signatures)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.