mlampros Organizing and Sharing thoughts, Receiving constructive feedback

Comparison of Partition Around Medoid R programming Implementations

Back in September 2016 I implemented the ClusterR package. One of the algorithms included in ClusterR was the ‘Partition Around Medoids’ (Cluster_Medoids) algorithm which was based on the paper “Anja Struyf, Mia Hubert, Peter J. Rousseeuw, (Feb. 1997), Clustering in an Object-Oriented Environment, Journal of Statistical Software, Vol 1, Issue 4” (at that time I didn’t have access to the book of Kaufman and Rousseeuw, Finding Groups in Data (1990) where the exact algorithm was described), thus I implemented the code and compared my results with the output of the cluster::pam() function, which was available at that time. Thus, my method was not an exact but an approximate one. Recently, a user of the ClusterR package opened an issue mentioning that the results were not optimal compared to the cluster::pam() function and this allowed me to go through my code once again and also to compare my results to new R packages that were not existent at that time. Most of these R packages include a new version of the ‘Partition Around Medoids’ algorithm, “Erich Schubert, Peter J. Rousseeuw,”Faster k-Medoids Clustering: Improving the PAM, CLARA, and CLARANS Algorithms” 2019, <doi:10.1007/978-3-030-32047-8_16>”.

In this blog-post, I’ll use the following R packages,

to compare between the (as of December 2022) existing ‘Partition Around Medoids’ implementations in terms of output dissimilarity cost and elapsed time.

Continue reading...

Functionality of the fastGLCM R package

This blog post is a slight modification of the R package Vignette and shows how to use the Rcpp Armadillo version of the fastGLCM R package. The fastGLCM R package is an RcppArmadillo implementation of the Python Code for Fast Gray-Level Co-Occurrence Matrix by numpy,

The python version works similarly and is included as an R6 class (see the documentation of fastglcm). However, it requires a python configuration in the user’s operating system and additionally the installation of the reticulate R package.

Continue reading...

Variational Mode Decomposition (VMD) using R

This blog post is a slight modification of the R package Vignette. The VMDecomp R package is an RcppArmadillo implementation of the Matlab Code for Variational Mode Decomposition (1- and 2-dimensional) based on the papers,

  • “Variational Mode Decomposition” by K. Dragomiretskiy and D. Zosso in IEEE Transactions on Signal Processing, vol. 62, no. 3, pp. 531-544, Feb.1, 2014, https://doi.org/10.1109/TSP.2013.2288675
  • “Two-Dimensional Variational Mode Decomposition” by Dragomiretskiy, K., Zosso, D. (2015), In: Tai, XC., Bae, E., Chan, T.F., Lysaker, M. (eds) Energy Minimization Methods in Computer Vision and Pattern Recognition. EMMCVPR 2015. Lecture Notes in Computer Science, vol 8932. Springer, https://dx.doi.org/10.1007/978-3-319-14612-6_15

The Matlab code is available to download in the Author’s website (https://math.montana.edu/dzosso/code/).

Continue reading...

ICESat-2 Altimeter Data using R

This blog post (which is a slight modification of both package Vignettes) explains the functionality of the IceSat2R R package and shows how to use the OpenAltimetry API from within R. It consists of three parts,

  • OpenAltimetry
  • IceSat-2 Mission Orbits
  • IceSat-2 Atlas Products

Continue reading...

Norway's International Climate and Forest Initiative (NICFI) using Planet Satellite Imagery in R

In this blog post I’ll explain the functionality of the PlanetNICFI R package based on a change detection use case. The official website of NICFI (Norway’s International Climate and Forest Initiative) includes all the details about the initiative against global deforestation. This initiative was also covered extensively on the web especially from the provider of the free Satellite Imagery. Users have the opportunity to download high-resolution imagery of forests globally using a simple sign up form.

To take advantage of the PlanetNICFI R package you will need also an API key which you can receive once you are registered. For more details see the Getting Started with Planet APIs website.

Continue reading...