Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Public Attributes | List of all members
faiss::PolysemousTraining Struct Reference

optimizes the order of indices in a ProductQuantizer More...

#include <PolysemousTraining.h>

Inheritance diagram for faiss::PolysemousTraining:
faiss::SimulatedAnnealingParameters

Public Types

enum  Optimization_type_t { OT_None, OT_ReproduceDistances_affine, OT_Ranking_weighted_diff }
 

Public Member Functions

void optimize_pq_for_hamming (ProductQuantizer &pq, size_t n, const float *x) const
 
void optimize_ranking (ProductQuantizer &pq, size_t n, const float *x) const
 called by optimize_pq_for_hamming
 
void optimize_reproduce_distances (ProductQuantizer &pq) const
 called by optimize_pq_for_hamming
 

Public Attributes

Optimization_type_t optimization_type
 
int ntrain_permutation
 
double dis_weight_factor
 
std::string log_pattern
 
- Public Attributes inherited from faiss::SimulatedAnnealingParameters
double init_temperature
 
double temperature_decay
 
int n_iter
 
int n_redo
 
int seed
 
int verbose
 
bool only_bit_flips
 
bool init_random
 

Detailed Description

optimizes the order of indices in a ProductQuantizer

Definition at line 127 of file PolysemousTraining.h.

Member Enumeration Documentation

Enumerator
OT_ReproduceDistances_affine 

default

OT_Ranking_weighted_diff 

same as _2, but use rank of y+ - rank of y-

Definition at line 129 of file PolysemousTraining.h.

Member Function Documentation

void faiss::PolysemousTraining::optimize_pq_for_hamming ( ProductQuantizer pq,
size_t  n,
const float *  x 
) const

reorder the centroids so that the Hamming distace becomes a good approximation of the SDC distance (called by train)

Definition at line 945 of file PolysemousTraining.cpp.


The documentation for this struct was generated from the following files: