This file is indexed.

/usr/include/shogun/machine/GaussianProcessMachine.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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
 * 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) 2013 Roman Votyakov
 */

#ifndef _GAUSSIANPROCESSMACHINE_H_
#define _GAUSSIANPROCESSMACHINE_H_

#include <shogun/lib/config.h>
#include <shogun/machine/Machine.h>
#include <shogun/machine/gp/InferenceMethod.h>

#ifdef HAVE_EIGEN3

namespace shogun
{

/** @brief A base class for Gaussian Processes.
 *
 * Instead of a distribution over weights, the GP specifies a distribution over
 * functions:
 *
 * \f[
 * f(x) \sim \mathcal{GP} (m(x), k(x,x'))
 * \f]
 *
 * where \f$m(x)\f$ - mean function, \f$k(x, x')\f$ - covariance function.
 */
class CGaussianProcessMachine : public CMachine
{
public:
	/** default constructor */
	CGaussianProcessMachine();

	/** constructor
	 *
	 * @param method inference method
	 */
	CGaussianProcessMachine(CInferenceMethod* method);

	virtual ~CGaussianProcessMachine();

	/** returns name of the machine
	 *
	 * @return name GaussianProcessMachine
	 */
	virtual const char* get_name() const { return "GaussianProcessMachine"; }

	/** returns a mean \f$\mu\f$ of a Gaussian distribution
	 * \f$\mathcal{N}(\mu,\sigma^2)\f$, which is an approximation to the
	 * posterior marginal \f$p(f_*|X,y,x_*)\f$.
	 *
	 * @param data testing features
	 *
	 * @return posterior means
	 */
	SGVector<float64_t> get_posterior_means(CFeatures* data);

	/** returns a variance \f$\sigma^2\f$ of a Gaussian distribution
	 * \f$\mathcal{N}(\mu,\sigma^2)\f$, which is an approximation to the
	 * posterior marginal \f$p(f_*|X,y,x_*)\f$.
	 *
	 * @param data testing features
	 *
	 * @return posterior variances
	 */
	SGVector<float64_t> get_posterior_variances(CFeatures* data);

	/** get inference method
	 *
	 * @return inference method, which is used by Gaussian process machine
	 */
	CInferenceMethod* get_inference_method() const
	{
		SG_REF(m_method);
		return m_method;
	}

	/** set inference method
	 *
	 * @param method inference method
	 */
	void set_inference_method(CInferenceMethod* method)
	{
		SG_REF(method);
		SG_UNREF(m_method);
		m_method=method;
	}

	/** set training labels
	 *
	 * @param lab labels to set
	 */
	virtual void set_labels(CLabels* lab)
	{
		CMachine::set_labels(lab);
		m_method->set_labels(lab);
	}

	/** Stores feature data of underlying model. After this method has been
	 * called, it is possible to change the machine's feature data and call
	 * apply(), which is then performed on the training feature data that is
	 * part of the machine's model.
	 */
	virtual void store_model_features() { }

private:
	void init();

protected:
	/** inference method */
	CInferenceMethod* m_method;
};
}
#endif /* HAVE_EIGEN3 */
#endif /* _GAUSSIANPROCESSMACHINE_H_ */