This file is indexed.

/usr/include/shogun/evaluation/ClusteringEvaluation.h is in libshogun-dev 3.1.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Written (W) 2012 Chiyuan Zhang
 * Copyright (C) 2012 Chiyuan Zhang
 */

#ifndef __CLUSTERINGEVALUATION_H__
#define __CLUSTERINGEVALUATION_H__

#include <vector>

#include <shogun/evaluation/Evaluation.h>
#include <shogun/labels/Labels.h>

namespace shogun
{

/** @brief The base class used to evaluate clustering
 */
class CClusteringEvaluation: public CEvaluation
{
public:
	/** constructor */
	CClusteringEvaluation(): CEvaluation() {}

	/** destructor */
	virtual ~CClusteringEvaluation() {}

	/** permute the order of the predicted labels to match the ground_truth as good as possible.
	 *
	 * The Munkres assignment algorithm is used to find the best match.
	 * Note this method perform inplace modification on the parameter predicted
	 * @param predicted labels for evaluating
	 * @param ground_truth labels assumed to be correct
	 */
	void best_map(CLabels* predicted, CLabels* ground_truth);

	/** evaluate labels
	 * @param predicted labels for evaluating
	 * @param ground_truth labels assumed to be correct
	 * @return evaluation result
	 */
	virtual float64_t evaluate(CLabels* predicted, CLabels* ground_truth) = 0;
protected:
	/** find number of matches in the two labels sequence.
	 *
	 * For each index i, if l1[i] == m1 and l2[i] == m2, then we get a match.
	 * @param l1 the first label sequence to be matched
	 * @param m1 the first label to match
	 * @param l2 the second label sequence to be matched
	 * @param m2 the second label to match
	 * @return number of matches
	 */
	int32_t find_match_count(SGVector<int32_t> l1, int32_t m1, SGVector<int32_t> l2, int32_t m2);

	/** find number of mismatches in the two labels sequence.
	 * @see find_match_count
	 */
	int32_t find_mismatch_count(SGVector<int32_t> l1, int32_t m1, SGVector<int32_t> l2, int32_t m2);
};

} // namespace shogun

#endif /* end of include guard: __CLUSTERINGEVALUATION_H__ */