dodiscover.ci.kernel_utils.corrent_matrix#

dodiscover.ci.kernel_utils.corrent_matrix(data, metric='rbf', kwidth=None, distance_metric='euclidean', n_jobs=None)[source]#

Compute the centered correntropy of a matrix.

Parameters:
dataarray_like of shape (n_samples, n_features)

The data.

metricstr

The kernel metric.

kwidthfloat

The kernel width.

distance_metricstr

The distance metric to infer kernel width.

n_jobsint, optional

The number of jobs to run computations in parallel, by default None.

Returns:
dataarray_like of shape (n_features, n_features)

A symmetric centered correntropy matrix of the data.

Notes

The estimator for the correntropy array is given by the formula \(1 / N \sum_{i=1}^N k(x_i, y_i) - 1 / N**2 \sum_{i=1}^N \sum_{j=1}^N k(x_i, y_j)\). The first term is the estimate, and the second term is the bias, and together they form an unbiased estimate.