Table of Contents

NAME

QccDatasetMSE - calculate mean squared error (MSE) between two datasets

SYNOPSIS

#include "libQccPack.h"

double QccDatasetMSE(const QccDataset *dataset1, const QccDataset *dataset2);

DESCRIPTION

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.

RETURN VALUE

On success, the MSE value (necessarily a nonnegative floating-point number) is returned. On error, -1.0 is returned.

SEE ALSO

QccDataset(3) , QccPack(3)

NOTES

For datasets being accessed via block-based access, QccDatasetMSE() calculates the MSE on only the current blocks of each dataset.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads