hops
include
hops
Model
Model.hpp
Go to the documentation of this file.
1
#ifndef HOPS_MODEL_HPP
2
#define HOPS_MODEL_HPP
3
4
#include <optional>
5
#include <string>
6
#include <vector>
7
8
#include <
hops/Utility/MatrixType.hpp
>
9
#include <
hops/Utility/VectorType.hpp
>
10
11
namespace
hops
{
12
class
Model
{
13
public
:
14
virtual
~Model
() =
default
;
15
21
[[nodiscard]]
virtual
typename
MatrixType::Scalar
computeNegativeLogLikelihood
(
const
VectorType
&x)
const
= 0;
22
23
[[nodiscard]]
virtual
std::optional<VectorType>
computeLogLikelihoodGradient
(
const
VectorType
&x)
const
{
24
return
std::nullopt;
25
};
26
27
[[nodiscard]]
virtual
std::optional<MatrixType>
computeExpectedFisherInformation
(
const
VectorType
&)
const
{
28
return
std::nullopt;
29
}
30
31
[[nodiscard]]
virtual
std::optional<std::vector<std::string>>
getParameterNames
()
const
{
32
return
std::nullopt;
33
}
34
};
35
}
36
37
#endif //HOPS_MODEL_HPP
hops::Model::computeNegativeLogLikelihood
virtual MatrixType::Scalar computeNegativeLogLikelihood(const VectorType &x) const =0
Evaluates the negative log likelihood for input x.
hops::Model::computeExpectedFisherInformation
virtual std::optional< MatrixType > computeExpectedFisherInformation(const VectorType &) const
Definition:
Model.hpp:27
hops::Model::~Model
virtual ~Model()=default
hops::Model::getParameterNames
virtual std::optional< std::vector< std::string > > getParameterNames() const
Definition:
Model.hpp:31
hops::Model::computeLogLikelihoodGradient
virtual std::optional< VectorType > computeLogLikelihoodGradient(const VectorType &x) const
Definition:
Model.hpp:23
hops
Definition:
CsvReader.hpp:8
VectorType.hpp
MatrixType.hpp
hops::Model
Definition:
Model.hpp:12
hops::VectorType
Eigen::VectorXd VectorType
Definition:
VectorType.hpp:7
Generated by
1.8.17