Table of Contents
QccDatasetMSE - calculate mean squared error (MSE) between two datasets
#include "libQccPack.h"
double QccDatasetMSE(const QccDataset
*dataset1, const QccDataset *dataset2);
QccDatasetMSE() calculates
the mean squared error (MSE) between the vector arrays of two datasets.
The vector_dimension and access_block_size of the datasets must be the
same.
The MSE is calculated as follows. For each i, the vector difference
is calculated between dataset1->vectors[i] and dataset2->vectors[i]. The square
of this norm is calculated to give the squared distance, or squared error,
between the two vectors. Finally, the squared error for all vectors is
summed and divided by the block size to give the mean squared error.
On success, the MSE value (necessarily a nonnegative floating-point
number) is returned. On error, -1.0 is returned.
QccDataset(3)
,
QccPack(3)
For datasets being accessed via block-based access, QccDatasetMSE()
calculates the MSE on only the current blocks of each dataset.
Copyright (C) 1997-2021 James E. Fowler
Table of Contents