|
QDpy
|
Fit a linear descriptor with Bradley-Terry preference likelihoods. More...
Public Member Functions | |
| fit (self, raw_features, triplets, *, steps=128, batch_size=32, learning_rate=.01, seed=0) | |
| Public Member Functions inherited from qdpy.algorithms.qdhf.TripletProjector | |
| transform (self, raw_features) | |
| Apply the same projection to one vector or a matrix of row vectors. | |
Fit a linear descriptor with Bradley-Terry preference likelihoods.
Train on anchor, near, far index triples using log likelihood. Two distinct pairs in a triplet share one anchor. Similarity is negative squared Euclidean distance in the projected coordinates. A small weight penalty regularizes otherwise separable comparisons. :param raw_feature_size: Input width. :param descriptor_size: Learned coordinate width. :param temperature: Positive divisor for the difference in similarities. :param regularization: Nonnegative squared-weight penalty. :param seed: Initial projection seed.
| qdpy.algorithms.divhf.DivHFProjector.fit | ( | self, | |
| raw_features, | |||
| triplets, | |||
| * | , | ||
| steps = 128, | |||
| batch_size = 32, | |||
| learning_rate = .01, | |||
| seed = 0 ) |
Fit probabilities for anchor, closer, farther labels by minimizing cross-entropy.
Reimplemented from qdpy.algorithms.qdhf.TripletProjector.