ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This module contains procedures and routines for finding the minimum-volume bounding ellipsoid partitioning of a given set of points by minimizing the volumes of the ellipsoids and comparing them against their parents. Monday 2:37 am, March 28, 2021, Dallas, TX Saturday 00:37 am, March 13, 2021, Dallas, TX Saturday 02:37 am, May 31, 2021, Dallas, TX Tuesday 2:13 am, March 10, 2021, Dallas, TX. More...
Data Types | |
type | KmeansTry_type |
type | KvolTry_type |
interface | partition_type |
The partition_type class. Partitions an input array Point(nd,np) with nd attributes and np observations (points). More... | |
type | ParTry_type |
Functions/Subroutines | |
function | partition_typer (Point, nc, nt, nsim, nemax, minSize, stanEnabled, trimEnabled, kmeansRelTol, logExpansion, logShrinkage if MINVOL_ENABLED |
This function can serve as the constructor for partition_type while also performing the partitioning for the first time. Construct a hierarchical partitioning of the input Point using a combination of Kmeans, Kvolume, and density maximization algorithms. More... | |
subroutine | runPartition (Partition, Point, parentLogVolNormed) |
This procedure is a method of the class partition_type. Perform recursive clustering of the input Point(nd,np) . More... | |
PURE real(RK) function | getLogLikeFitness (count, logVolRatio) |
real(RK) function, dimension(npmin:npmax) | getBiasCorrectionScaleFactorSq (nd, npmin, npmax) |
subroutine | writePartition (Partition, fileUnit, Point) |
Variables | |
character(*, SK), parameter | MODULE_NAME = "@pm_clusDensity" |
real(RK), parameter | POSINF = +huge(0._RK) / 10 |
real(RK), parameter | NEGINF = -huge(0._RK) / 10 |
This module contains procedures and routines for finding the minimum-volume bounding ellipsoid partitioning of a given set of points by minimizing the volumes of the ellipsoids and comparing them against their parents. Monday 2:37 am, March 28, 2021, Dallas, TX Saturday 00:37 am, March 13, 2021, Dallas, TX Saturday 02:37 am, May 31, 2021, Dallas, TX Tuesday 2:13 am, March 10, 2021, Dallas, TX.
real(RK) function, dimension(npmin:npmax) pm_clusDensity::getBiasCorrectionScaleFactorSq | ( | integer(IK), intent(in) | nd, |
integer(IK), intent(in) | npmin, | ||
integer(IK), intent(in) | npmax | ||
) |
Definition at line 928 of file pm_clusDensity.F90.
Referenced by pm_clusDensity::partition_type::partition_typer().
PURE real(RK) function pm_clusDensity::getLogLikeFitness | ( | integer(IK), intent(in) | count, |
real(RK) | logVolRatio | ||
) |
Definition at line 907 of file pm_clusDensity.F90.
function pm_clusDensity::partition_typer | ( | real(RK) | Point, |
integer(IK), intent(in), optional | nc, | ||
integer(IK), intent(in), optional | nt, | ||
integer(IK), intent(in), optional | nsim, | ||
integer(IK), intent(in), optional | nemax, | ||
integer(IK) | minSize, | ||
logical(LK) | stanEnabled, | ||
logical(LK) | trimEnabled, | ||
real(RK) | kmeansRelTol, | ||
real(RK) | logExpansion, | ||
real(RK) | logShrinkage, | ||
if, | |||
MINVOL_ENABLED | |||
) |
This function can serve as the constructor for partition_type
while also performing the partitioning for the first time. Construct a hierarchical partitioning of the input Point
using a combination of Kmeans, Kvolume, and density maximization algorithms.
[in] | Point | : An array of size (nd = #dimensions, np = #observations) containing the input set of points to partition. |
[in] | nc | : The number of clusters at each level of partitioning (optional, default = 2 ). |
[in] | nt | : The number of Kmeans clustering tries before choosing the optimal clustering among all (optional, default = 1 ). |
[in] | nsim | : The number of Monte Carlo simulation tries to estimate the sum of volumes of partitions excluding overlaps (optional, default = 0 ). |
[in] | nemax | : The maximum number of partitions to be expected or identified in the input Point (optional, default = max(nc, 1 + np / (nd + 1)) ). |
[in] | minSize | : The minimum allowed size of a partition, that is, the minimum allowed number of points in a partition (optional, default = 0 ). |
[in] | stanEnabled | : A logical value, indicating weather Point should be standardized prior to each Kmeans clustering (optional, default = .true. ). |
[in] | trimEnabled | : A logical value, indicating weather all allocatable components have been trimmed to the minimum size (optional, default = .false. ). |
[in] | kmeansRelTol | : The relative tolerance below which the Kmeans clustering is assumed to have converged (optional, default = 1.e-4 ). |
[in] | logExpansion | : The factor by which the expected volumes of the bounding ellipsoids are enlarged before any comparisons are made for further sub-partitioning (optional, default = 0. ). |
[in] | logShrinkage | : The logarithm of the factor by which the sum of the volumes of the children bounds must be smaller than their parents to warrant further sub-partitioning (optional, default = 0. ). |
[in] | inclusionFraction | : The fraction of non-member points that are inside the partition, to be used in estimating of the true volumes of the partitions (optional, default = 1. ). |
[in] | parentLogVolNormed | : The logarithm of the volume of the input set of points normalized to the volume of the unit nd -ball (optional, default = -infinity ). |
[in] | mahalSqWeightExponent | : The exponent with which the density of the partitions are exponentiated to be used as the Mahalanobis distance weights (optional, default = 0. ). |
[in] | kmeansNumFailMax | : The maximum number of times Kmeans clustering is allowed to fail (optional, default = 10 ). |
[in] | kmeansNumRecursionMax | : The maximum number of times Kmeans clustering is allowed to refine the cluster centers via the algorithm of Lloyd (optional, default = 300 ). |
[in] | kvolumeNumRecursionMax | : The maximum number of times Kvolume algorithm is run to minimize the partition volumes at a given partitioning level (optional, default = 3 ). |
Point
will be reordered.trimEnabled = .false.
, only the first 1:ne
elements of all allocatable
arrays contain meaningful information. As such, the rest of the trailing elements must be properly ignored when using the allocatable Partition components. For example, upon exit, only PartitionLogVolNormed(1 : Partitionne)
contain meaningful information.trimEnabled = .true.
, all allocatable
arrays will be trimmed from size nemax
to the size ne
. In such a case, calling the method Partitiontun()
after constructing the Partition
object for the first time will likely lead to segmentation fault error.nsim = 0
, the effective sum of volumes will be computed and used assuming that no partitions overlap. This is essentially equivalent to summing over all partition volumes.parentLogVolNormed
, both parentLogVolNormed
and pointLogVolNormed
will (must) be set to NEGINF
.Definition at line 220 of file pm_clusDensity.F90.
subroutine pm_clusDensity::runPartition | ( | class(partition_type) | Partition, |
real(RK) | Point, | ||
real(RK) | parentLogVolNormed | ||
) |
This procedure is a method of the class partition_type. Perform recursive clustering of the input Point(nd,np)
.
[in,out] | Partition | : An object of class partition_type that contains the partitioning configuration on input and the partition on output. |
[in,out] | Point | : An array of size (nd,np) containing the input set of points to partition. |
nemax
must be always larger than or equal to nc
.Point
will be reordered. Definition at line 360 of file pm_clusDensity.F90.
subroutine pm_clusDensity::writePartition | ( | class(partition_type) | Partition, |
integer(IK) | fileUnit, | ||
real(RK) | Point | ||
) |
Definition at line 978 of file pm_clusDensity.F90.
character(*, SK), parameter pm_clusDensity::MODULE_NAME = "@pm_clusDensity" |
Definition at line 70 of file pm_clusDensity.F90.
real(RK), parameter pm_clusDensity::NEGINF = -huge(0._RK) / 10 |
Definition at line 72 of file pm_clusDensity.F90.
real(RK), parameter pm_clusDensity::POSINF = +huge(0._RK) / 10 |
Definition at line 71 of file pm_clusDensity.F90.