|
| template<pRC::Size R, pRC::Operator::Transform OT = pRC::Operator::Transform::None, pRC::Size D, class T , class Tb , class X > |
| auto | ALS (MHNOperator< T, D > const &MHNop, Tb const &b, T const &tolerance, X const &x0) |
| |
| template<pRC::Size R, pRC::Operator::Transform OT = pRC::Operator::Transform::None, pRC::Size D, class T , class Tb > |
| auto | ALS (MHNOperator< T, D > const &MHNop, Tb const &b, T const &tolerance) |
| |
| template<pRC::Size RP, pRC::Size RQ, class T , pRC::Size D, class S > |
| std::tuple< pRC::Tensor< T, D, D >, std::map< std::string, std::string >, std::map< std::string, double > > | learnTheta (pRC::Tensor< T, D, D > const &theta, std::string const &header, std::string const &output, std::map< S, T > const &pD, cMHN::Score< T > const &Score, cMHN::Regulator< T, D > const &Regulator, T const &toleranceOptimizer, T const &toleranceSolverP, T const &toleranceSolverQ) |
| | Optimizes an MHN represented by a theta matrix to best describe a given data distribution using the TT format. More...
|
| |
| template<pRC::Size R, pRC::Operator::Transform OT = pRC::Operator::Transform::None, pRC::Size D, class T , class Tb > |
| auto | MAMEN (MHNOperator< T, D > const &MHNop, Tb const &b, T const &tolerance) |
| |
| template<pRC::Size D, pRC::Size N = 2> |
| constexpr auto | getModeSizes () |
| |
| template<pRC::Size D, pRC::Size R, pRC::Size N = 2> |
| constexpr auto | getRanks () |
| |
template<pRC::Size RP, pRC::Size RQ, class
T , pRC::Size D, class
S >
| std::tuple< pRC::Tensor< T, D, D >, std::map< std::string, std::string >, std::map< std::string, double > > cMHN::TT::learnTheta |
( |
pRC::Tensor< T, D, D > const & |
theta, |
|
|
std::string const & |
header, |
|
|
std::string const & |
output, |
|
|
std::map< S, T > const & |
pD, |
|
|
cMHN::Score< T > const & |
Score, |
|
|
cMHN::Regulator< T, D > const & |
Regulator, |
|
|
T const & |
toleranceOptimizer, |
|
|
T const & |
toleranceSolverP, |
|
|
T const & |
toleranceSolverQ |
|
) |
| |
Optimizes an MHN represented by a theta matrix to best describe a given data distribution using the TT format.
The optimization is done by BFGS. Logging information containing Score and Regulator names, Iteration number, Time, Score and Regularization strength is written to file after every iteration.
The optimized theta is returned. Additionally, two std::maps are returned containing logging information:
- std::map<std::string, std::string> logInfoNames: Info like Score name and Regulator name
- std::map<std::string, double> logInfoNumbers: Info like final score and runtime
- Template Parameters
-
| RP | max TT rank used for pTheta |
| RQ | max TT rank used for q in calculation of derivatives |
| T | type used for calculations (inferred) |
| D | number of events of the dataset (inferred) |
| S | Subscripts type used as keys in data distribution (inferred) |
- Parameters
-
| theta | theta matrix representing the initial MHN |
| header | header of the data (usually containing event names) |
| output | file to write the theta matrix to |
| pD | data distribution to learn |
| Score | Score object representing the score used |
| Regulator | Regulator object representing the regulator used |
| toleranceOptimizer | tolerance of the optimizer |
| toleranceSovlerP | tolerance of the solver for calculating pTheta |
| toleranceSolverQ | tolerance of the solver for calculating q (intermediate result for calculating the derivatives) |