GofTest¶
- 
class hyppo.kgof.base.GofTest(p, alpha)¶
- A base class for a discriminability test. - Parameters
- compute_distance ( - str,- callable, or- None, default:- "euclidean"or- "gaussian") -- A function that computes the distance among the samples within each data matrix. Valid strings for- compute_distanceare, as defined in- sklearn.metrics.pairwise_distances,- From scikit-learn: [ - "euclidean",- "cityblock",- "cosine",- "l1",- "l2",- "manhattan"] See the documentation for- scipy.spatial.distancefor 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 for- scipy.spatial.distancefor details on these metrics.
 - Alternatively, this function computes the kernel similarity among the samples within each data matrix. Valid strings for - compute_kernelare, as defined in- sklearn.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(X)¶
- Calculates the goodness-of-fit test statistic. - Parameters
- dat ( - an instanceof- Data (observed data)) -- Input data matrices.
 
- 
abstract GofTest.test(X)¶
- Perform the goodness-of-fit test and return values computed in a dictionary. - Parameters
- dat ( - an instanceof- Data (observed data))
- Returns
- {-- alpha: 0.01, pvalue: 0.0002, test_stat: 2.3, h0_rejected: True, time_secs: ...
- }
 
 
