MUQ  0.4.3
MultiLogisticLikelihood.h
Go to the documentation of this file.
1 #ifndef MULTILOGISTICLIKELIHOOD_H
2 #define MULTILOGISTICLIKELIHOOD_H
3 
5 
6 namespace muq{
7  namespace Modeling{
8 
52  public:
53 
54  MultiLogisticLikelihood(unsigned int numClasses, Eigen::VectorXi const& data);
55 
56  private:
57 
58  virtual void EvaluateImpl(muq::Modeling::ref_vector<Eigen::VectorXd> const& inputs) override;
59 
60  virtual void GradientImpl(unsigned int const outputDimWrt,
61  unsigned int const inputDimWrt,
62  ref_vector<Eigen::VectorXd> const& input,
63  Eigen::VectorXd const& sensitivity) override;
64 
65  virtual void JacobianImpl(unsigned int const outputDimWrt,
66  unsigned int const inputDimWrt,
67  ref_vector<Eigen::VectorXd> const& input) override;
68 
69  virtual void ApplyJacobianImpl(unsigned int const outputDimWrt,
70  unsigned int const inputDimWrt,
71  ref_vector<Eigen::VectorXd> const& input,
72  Eigen::VectorXd const& vec) override;
73 
74  const unsigned int numClasses;
75  Eigen::VectorXi data;
76  };
77 
78  } // namespace Modeling
79 } // namespace muq
80 
81 
82 #endif
Provides an abstract interface for defining vector-valued model components.
Definition: ModPiece.h:148
Class that defines the likelihood function for multinomial logistic regression.
virtual void GradientImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &sensitivity) override
virtual void EvaluateImpl(muq::Modeling::ref_vector< Eigen::VectorXd > const &inputs) override
MultiLogisticLikelihood(unsigned int numClasses, Eigen::VectorXi const &data)
virtual void JacobianImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, ref_vector< Eigen::VectorXd > const &input) override
virtual void ApplyJacobianImpl(unsigned int const outputDimWrt, unsigned int const inputDimWrt, ref_vector< Eigen::VectorXd > const &input, Eigen::VectorXd const &vec) override
std::vector< std::reference_wrapper< const T > > ref_vector
A vector of references to something ...
Definition: WorkPiece.h:37