Package jline.api.mam
Class Mamap2m_fit_fb_multiclass
java.lang.Object
jline.api.mam.Mamap2m_fit_fb_multiclass
Port of m3a
mamap2m_fit_fb_multiclass.m: marks a second-order acyclic MAP
in canonical form with m classes so that the class probabilities are matched
exactly and the per-class forward and backward moments as closely as the form
allows.
The marking probabilities q(j,c) of the three D1 entries are affine in the
fitted moments, q(j,c) = fF(c) q_f(j,c) + fB(c) q_b(j,c) + q_0(j,c), so the fit
is a strictly convex quadratic program, solved exactly by M3a_qp as
MATLAB solves it with its Goldfarb-Idnani QP. Degenerate forms, where only F,
only B or nothing can be fitted, take the reference's dedicated branches.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFitted MMAP with the forward and backward moments it realizes. -
Method Summary
Modifier and TypeMethodDescriptionmamap2m_fit_fb_multiclass(MatrixCell map, double[] p, double[] F, double[] B) mamap2m_fit_fb_multiclass(MatrixCell map, double[] p, double[] F, double[] B, double[] classWeights, double[] fbWeights)
-
Method Details
-
mamap2m_fit_fb_multiclass
public static Mamap2m_fit_fb_multiclass.FitResult mamap2m_fit_fb_multiclass(MatrixCell map, double[] p, double[] F, double[] B) -
mamap2m_fit_fb_multiclass
public static Mamap2m_fit_fb_multiclass.FitResult mamap2m_fit_fb_multiclass(MatrixCell map, double[] p, double[] F, double[] B, double[] classWeights, double[] fbWeights) - Parameters:
map- second-order acyclic MAP in canonical form 1 (gamma > 0) or 2 (gamma < 0)p- class probabilitiesF- target first-order forward momentsB- target first-order backward momentsclassWeights- per-class weights (null for ones)fbWeights- weights of the forward and backward moments (null for ones)
-