public static FactorGraph getFgLat ( FactorGraph fgLatPred , VarConfig goldConfig ) { // TODO: instead, have this just look at whether or not the var is in the gold config List < Var > predictedVars = VarSet . getVarsOfType ( fgLatPred . getVars ( ) , VarType . PREDICTED ) ; VarConfig predConfig = goldConfig . getIntersection ( predictedVars ) ; FactorGraph fgLat = fgLatPred . getClamped ( predConfig ) ; assert ( fgLatPred . getNumFactors ( ) <= fgLat . getNumFactors ( ) ) ; return fgLat ; }
Get a copy of the factor graph where the predicted variables are clamped .