Clustering Module



Derived Types

type, public ::  kMeans_t

Components

Type Visibility Attributes Name Initial
logical, public :: initialized = .false.
integer, public :: ndims
integer, public :: nclusters
integer, public :: maxiters
logical, public :: centroids_set
integer, public, allocatable :: prevClusters(:)
integer, public, allocatable :: clusters(:)
real(kind=RP), public, allocatable :: centroids(:,:)

Finalizations Procedures

final :: kMeans_final

Type-Bound Procedures

procedure, public :: init => kMeans_init
procedure, public :: fit => kMeans_fit
procedure, public :: predict => kMeans_predict

type, public ::  GMM_t

Components

Type Visibility Attributes Name Initial
logical, public :: initialized = .false.
logical, public :: with_kmeans
integer, public :: ndims
integer, public :: nclusters
integer, public :: max_nclusters
integer, public :: maxiters
real(kind=RP), public :: mutol
real(kind=RP), public :: lltol
real(kind=RP), public :: zerotol
real(kind=RP), public :: logL
real(kind=RP), public, allocatable :: prob(:,:)
real(kind=RP), public, pointer, contiguous :: centroids(:,:)
type(GaussianList_t), public :: g
type(kMeans_t), public :: kmeans

Finalizations Procedures

final :: GMM_final

Type-Bound Procedures

procedure, public :: init => GMM_init
procedure, public :: fit => GMM_fit
procedure, public :: predict => GMM_predict

Subroutines

public subroutine standardize(x)

Arguments

Type IntentOptional Attributes Name
real(kind=RP), intent(inout) :: x(:,:)

public subroutine rescale(x, s, o)

Arguments

Type IntentOptional Attributes Name
real(kind=RP), intent(inout) :: x(:,:)
real(kind=RP), intent(in), optional :: s
real(kind=RP), intent(in), optional :: o