dissimilarity
summed_dissimilarity_sampler(X, X_ref, n=1, metric='euclidean')
This dissimilarity samples re-arranges the pool of IV conditions according to their dissimilarity with respect to a reference pool X_ref. The default dissimilarity is calculated as the average of the pairwise distances between the conditions in X and X_ref.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
np.ndarray
|
pool of IV conditions to evaluate dissimilarity |
required |
X_ref |
np.ndarray
|
reference pool of IV conditions |
required |
n |
int
|
number of samples to select |
1
|
metric |
str
|
dissimilarity measure. Options: 'euclidean', 'manhattan', 'chebyshev', 'minkowski', 'wminkowski', 'seuclidean', 'mahalanobis', 'haversine', 'hamming', 'canberra', 'braycurtis', 'matching', 'jaccard', 'dice', 'kulsinski', 'rogerstanimoto', 'russellrao', 'sokalmichener', 'sokalsneath', 'yule'. See sklearn.metrics.DistanceMetric for more details. |
'euclidean'
|
Returns:
Type | Description |
---|---|
np.ndarray
|
Sampled pool |
Source code in autora/experimentalist/sampler/dissimilarity.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|