13#include <NeMachineLearningLib.h>
14#include <MachineLearning/CommonUtil.h>
18 namespace MachineLearning
22 enum class BackConstType
40 template<
typename Scalar>
69 virtual void Init(
const af::array& Y,
const af::array& X,
const af::array& segments) = 0;
134 BackConstType backType;
136 friend class boost::serialization::access;
138 template<
class Archive>
139 void serialize(Archive& ar,
unsigned int version)
141 ar& BOOST_SERIALIZATION_NVP(iN);
142 ar& BOOST_SERIALIZATION_NVP(iq);
143 ar& BOOST_SERIALIZATION_NVP(backType);
Abstract class for back-constraints, a kind of prior knowledge to force topological positions of unce...
virtual af::array GetParameters()=0
Gets the parameters.
af::dtype m_dType
floating point precision flag for af::array
virtual void Init(const af::array &Y, const af::array &X, const af::array &segments)=0
Initializes this object.
IBackconstraint(BackConstType type)
Constructor.
virtual int GetNumParameters()=0
Gets number of to be optimized parameters.
BackConstType GetType()
Gets the back-constraint type.
virtual ~IBackconstraint()
Destructor.
virtual af::array BackconstraintGradient(const af::array &gX)=0
Back-constraint gradient.
virtual af::array GetConstraintX()=0
Gets constraint x coordinates.
virtual void SetParameters(const af::array ¶m)=0
Sets the parameters.