forked from mblum/libgp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcov_noise.h
34 lines (28 loc) · 871 Bytes
/
cov_noise.h
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
// libgp - Gaussian process library for Machine Learning
// Copyright (c) 2013, Manuel Blum <[email protected]>
// All rights reserved.
#ifndef __COV_NOISE_H__
#define __COV_NOISE_H__
#include "cov.h"
namespace libgp
{
/** Independent covariance function (white noise).
* @author Manuel Blum
* @ingroup cov_group */
class CovNoise : public CovarianceFunction
{
public:
CovNoise ();
virtual ~CovNoise ();
bool init(int n);
double get(const Eigen::VectorXd &x1, const Eigen::VectorXd &x2);
void grad(const Eigen::VectorXd &x1, const Eigen::VectorXd &x2, Eigen::VectorXd &grad);
void set_loghyper(const Eigen::VectorXd &p);
virtual std::string to_string();
virtual double get_threshold();
virtual void set_threshold(double threshold);
private:
double s2;
};
}
#endif /* __COV_NOISE_H__ */