criteria.phi_p

criteria.phi_p(arr, p=15, q=1)

Calculate the phi_p Criterion

Parameters

Name Type Description Default
arr numpy.numpy.ArrayLike A numpy ndarray required
p int A positive integer, which is the parameter in the phi_p formula. The default is set to be 15. If (q) is 1, (inter_site) is the Manhattan (rectangular) distance. If (q) is 2, (inter_site) is the Euclidean distance. 15

Returns

Type Description
float A positive number indicating phi_p

Examples: Calculate the phi_p criterion for random_lhd with default settings

import pyLHD
random_lhd = pyLHD.LatinHypercube(size = (10,3))
pyLHD.phi_p(random_lhd)  
2.5128857125055477

Calculate the phi_p criterion of random_lhd with p=50 and q=2 (Euclidean)

pyLHD.phi_p(random_lhd,p=50,q=2) 
4.082482950076924