Struct faiss::MatrixStats

struct MatrixStats

Reports some statistics on a dataset and comments on them.

It is a class rather than a function so that all stats can also be accessed from code

Public Functions

MatrixStats(size_t n, size_t d, const float *x)
void do_comment(const char *fmt, ...)

Public Members

std::string comments
size_t n
size_t d
size_t n_collision
size_t n_valid
size_t n0
double min_norm2
double max_norm2
std::vector<PerDimStats> per_dim_stats
std::unordered_map<uint64_t, Occurrence> occurrences
char *buf
size_t nbuf
struct Occurrence

Public Members

size_t first
size_t count
struct PerDimStats

Public Functions

PerDimStats()
void add(float x)
void compute_mean_std()

Public Members

size_t n
size_t n_nan
size_t n_inf
size_t n0
float min
float max
double sum
double sum2
size_t n_valid
double mean
double stddev