All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
faiss::AutoTuneCriterion Struct Referenceabstract

`#include <AutoTune.h>`

Inheritance diagram for faiss::AutoTuneCriterion:

## Public Types

typedef Index::idx_t | idx_t

## Public Member Functions

| AutoTuneCriterion (idx_t nq, idx_t nnn)
void | set_groundtruth (int gt_nnn, const float *gt_D_in, const idx_t *gt_I_in)
virtual double | evaluate (const float *D, const idx_t *I) const =0

## Public Attributes

idx_t | nq
| nb of queries this criterion is evaluated on
idx_t | nnn
| nb of NNs that the query should request
idx_t | gt_nnn
| nb of GT NNs required to evaluate crterion
std::vector< float > | gt_D
| Ground-truth distances (size nq * gt_nnn)
std::vector< idx_t > | gt_I
| Ground-truth indexes (size nq * gt_nnn)

## Detailed Description

Evaluation criterion. Returns a performance measure in [0,1], higher is better.

Definition at line 26 of file AutoTune.h.

## Member Function Documentation

virtual double faiss::AutoTuneCriterion::evaluate | ( | const float * | D,
|  | const idx_t * | I
| ) |  | const

pure virtual

Evaluate the criterion.

Parameters

  D | size nq * nnn
  I | size nq * nnn

Returns
  the criterion, between 0 and 1. Larger is better.

void faiss::AutoTuneCriterion::set_groundtruth | ( | int | gt_nnn,
|  | const float * | gt_D_in,
|  | const idx_t * | gt_I_in
| ) |  |

Intitializes the gt_D and gt_I vectors. Must be called before evaluating

Parameters

  gt_D_in | size nq * gt_nnn
  gt_I_in | size nq * gt_nnn

Definition at line 36 of file AutoTune.cpp.

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

- /data/users/matthijs/github_faiss/faiss/AutoTune.h
- /data/users/matthijs/github_faiss/faiss/AutoTune.cpp