Template function implementations of the Bayesian Information Criterion. More...
#include <stdint.h>
#include <numeric>
#include <iostream>
#include <cmath>
#include <vector>
#include "dissimilarity.h"
#include "partition.h"
Go to the source code of this file.
Namespaces | |
namespace | cluster |
Namespace for everything in the cluster library. | |
Functions | |
template<typename D > | |
double | bic (const partition &p, D distance, size_t M) |
Directly computes the BIC from a partition object based on the cluster centroids and the number of clusters. | |
template<typename SizeIterator , typename DissimIterator > | |
double | bic (size_t k, SizeIterator cluster_sizes, DissimIterator sum2_dissim, size_t dimensionality) |
This version of the BIC assumes some precomputed information. |
Template function implementations of the Bayesian Information Criterion.
Here, we want to test whether a clustering's centroids or medoids are good predictors of the points in a data set, so these are our parameters, and we try to find the best clustering without too many clusters. For more on this technique and the approach we've based this implementation on, see this paper:
Definition in file bic.h.