Package jline.api.mam
Class Maph2m_fit
java.lang.Object
jline.api.mam.Maph2m_fit
-
Method Summary
Modifier and TypeMethodDescriptionstatic MatrixCellmaph2m_fit(double M1, double M2, double M3, Matrix P, Matrix B) Computes the second-order MAPH[m] fitting the first three moments, the class probabilities (always fitted exactly) and the first-order backward moments.static Pair<MatrixCell, Matrix> maph2m_fit_multiclass(MatrixCell aph, Matrix P, Matrix B) Convenience overload with unit class weights.static Pair<MatrixCell, Matrix> maph2m_fit_multiclass(MatrixCell aph, Matrix P, Matrix B, double[] classWeights) Marks a canonical acyclic APH(2) so that the class probabilities are matched exactly and the backward moments as closely as possible.
-
Method Details
-
maph2m_fit
Computes the second-order MAPH[m] fitting the first three moments, the class probabilities (always fitted exactly) and the first-order backward moments.- Parameters:
M1- first moment of the inter-arrival timesM2- second moment of the inter-arrival timesM3- third moment of the inter-arrival timesP- class probabilitiesB- first-order backward moments- Returns:
- the fitted MAPH(2,m) as {D0, D1, D11, ..., D1m}
-
maph2m_fit_multiclass
Convenience overload with unit class weights. -
maph2m_fit_multiclass
public static Pair<MatrixCell,Matrix> maph2m_fit_multiclass(MatrixCell aph, Matrix P, Matrix B, double[] classWeights) Marks a canonical acyclic APH(2) so that the class probabilities are matched exactly and the backward moments as closely as possible.- Parameters:
aph- underlying APH(2) in canonical acyclic formP- class probabilitiesB- target first-order backward momentsclassWeights- per-class weights in the objective (null for unit weights)- Returns:
- the fitted MAPH and the backward moments it realizes
-