GofTest¶
-
class
hyppo.kgof.base.
GofTest
(p, alpha)¶ A base class for a discriminability test.
- Parameters
compute_distance (
str
,callable
, orNone
, default:"euclidean"
or"gaussian"
) -- A function that computes the distance among the samples within each data matrix. Valid strings forcompute_distance
are, as defined insklearn.metrics.pairwise_distances
,From scikit-learn: [
"euclidean"
,"cityblock"
,"cosine"
,"l1"
,"l2"
,"manhattan"
] See the documentation forscipy.spatial.distance
for details on these metrics.From scipy.spatial.distance: [
"braycurtis"
,"canberra"
,"chebyshev"
,"correlation"
,"dice"
,"hamming"
,"jaccard"
,"kulsinski"
,"mahalanobis"
,"minkowski"
,"rogerstanimoto"
,"russellrao"
,"seuclidean"
,"sokalmichener"
,"sokalsneath"
,"sqeuclidean"
,"yule"
] See the documentation forscipy.spatial.distance
for details on these metrics.
Alternatively, this function computes the kernel similarity among the samples within each data matrix. Valid strings for
compute_kernel
are, as defined insklearn.metrics.pairwise.pairwise_kernels
,[
"additive_chi2"
,"chi2"
,"linear"
,"poly"
,"polynomial"
,"rbf"
,"laplacian"
,"sigmoid"
,"cosine"
]Note
"rbf"
and"gaussian"
are the same metric.
Methods Summary
|
Calculates the goodness-of-fit test statistic. |
|
Perform the goodness-of-fit test and return values computed in a dictionary. |
-
abstract
GofTest.
statistic
(dat)¶ Calculates the goodness-of-fit test statistic.
- Parameters
dat (
an instance
ofData (observed data)
) -- Input data matrices.
-
abstract
GofTest.
test
(dat)¶ Perform the goodness-of-fit test and return values computed in a dictionary.
- Parameters
dat (
an instance
ofData (observed data)
)- Returns
{
-- alpha: 0.01, pvalue: 0.0002, test_stat: 2.3, h0_rejected: True, time_secs: ...}