Add comment to spanning tree method

This commit is contained in:
Ricardo Montañana Gómez 2023-07-14 01:05:49 +02:00
parent 3f09d474f9
commit 002aa30672
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE

View File

@ -116,11 +116,18 @@ namespace bayesnet {
{ {
return entropy(firstFeature) - conditionalEntropy(firstFeature, secondFeature); return entropy(firstFeature) - conditionalEntropy(firstFeature, secondFeature);
} }
/*
Compute the maximum spanning tree considering the weights as distances
and the indices of the weights as nodes of this square matrix using
Kruskal algorithm
*/
vector<pair<int, int>> Metrics::maximumSpanningTree(Tensor& weights) vector<pair<int, int>> Metrics::maximumSpanningTree(Tensor& weights)
{ {
auto result = vector<pair<int, int>>(); auto result = vector<pair<int, int>>();
// Compute the maximum spanning tree considering the weights as distances
// and the indices of the weights as nodes of this square matrix
return result; return result;
} }