# src.evaluation_metric.objective_score¶

src.evaluation_metric.objective_score(pmat_pred: torch.Tensor, affmtx: torch.Tensor) torch.Tensor[source]

Objective score given predicted permutation matrix and affinity matrix from the problem.

$\text{objective score} = \mathrm{vec}(\mathbf{X})^\top \mathbf{K} \mathrm{vec}(\mathbf{X})$

where $$\mathrm{vec}(\cdot)$$ means column-wise vectorization.

Parameters
• pmat_pred – predicted permutation matrix $$(\mathbf{X})$$

• affmtx – affinity matrix of the quadratic assignment problem $$(\mathbf{K})$$

Returns

objective scores

Note

The most general mathematical form of graph matching is known as Quadratic Assignment Problem (QAP), which is an NP-hard combinatorial optimization problem. Objective score reflects the power of the graph matching/QAP solver concerning the objective score of the QAP.