API Reference#
This is the class and function reference of cblearn.
cblearn.datasets Datasets#
Loaders#
|
Load the 60-car dataset (most-central triplets). |
|
Load the Food-100 food similarity dataset (triplets). |
Load the imagenet similarity dataset (rank 2 from 8). |
|
Load the nature scene similarity dataset (odd-one-out). |
|
Load the material similarity dataset (triplets). |
|
Load the MusicSeer musician similarity dataset (triplets). |
|
Load the vogue cover similarity dataset (odd-one-out). |
|
Load the things similarity dataset (odd-one-out). |
|
|
Load human similarity judgements, aggregated to a similarity matrix. |
Synthetic Point Generation#
|
Linear Subspace |
Simulations#
|
Make random triplets with answers for the provided embedding or distances. |
Low-level Dataset Utility#
|
Make all triplet indices for a number of objects. |
|
Sample random triplet indices. |
|
Triplet responses for an embedding. |
|
Triplet response for an embedding with noise. |
cblearn.embedding Embedding#
|
Crowd Kernel Learning (CKL) embedding kernel for triplet data. |
|
Fast Ordinal Triplet Embedding (FORTE). |
|
Generalized Non-metric Multidimensional Scaling (GNMDS). |
|
Soft Ordinal Embedding (SOE). |
|
Stochastic Triplet Embedding algorithm (STE / t-STE). |
|
t-Distributed Stochastic Triplet Embedding (t-STE) |
|
Ordinal Embedding Neural Network (OENN). |
|
A maximum-likelihood difference scaling (MLDS) estimator . |
Utility#
|
Estimates the dimensionality of the embedding space. |
Result object for dimensionality estimation of embeddings. |
Wrapper#
|
A maximum-likelihood difference scaling (MLDS) estimator, wrapping the R implementation. |
|
A soft ordinal embedding estimator, wrapping an R implementation. |
cblearn.cluster Cluster#
|
ComparisonHC. |
cblearn.metrics Metrics#
|
Fraction of violated triplet constraints. |
|
Error measured by 1 - query accuracy.` |
|
Distance measure between embeddings under optimal transformation. |
|
Scorer function for query accuracy, compatible with sklearn's scorer API. |
cblearn.preprocessing Preprocessing#
|
Extract queries with indices from feature columns in a DataFrame. |
Calculate triplets from n-select or n-rank queries. |
|
Calculates triplets from odd-one-out queries. |
|
Calculates triplets from most-central queries. |
|
|
Wrapper to share an encoder across all columns. |
Encoder for objects that are a combination of labels in multiple columns. |
cblearn.utils Utility#
|
Extract format of comparison data. |
|
Validate comparison format description. |
|
Input validation for queries. |
|
Input validation for query formats. |
|
Input validation for query responses. |
|
Convert size argument to the number of objects. |