/** * Creates a graphical model for a given instance. * This is called unrolling a dynamic model. */ public UnrolledGraph (Instance inst, Template[] templates, List fixed, boolean setupPotentials) { super (initialCapacity (inst)); instance = inst; fvs = (FeatureVectorSequence) inst.getData (); assignment = (Assignment) inst.getTarget (); allTemplates = new ArrayList (); if (fixed != null) { allTemplates.addAll (fixed); } allTemplates.addAll (java.util.Arrays.asList (templates)); setupGraph (); if (setupPotentials) { computeCPFs (); } }
/** * Creates a graphical model for a given instance. * This is called unrolling a dynamic model. */ public UnrolledGraph (Instance inst, Template[] templates, List fixed, boolean setupPotentials) { super (initialCapacity (inst)); instance = inst; fvs = (FeatureVectorSequence) inst.getData (); assignment = (Assignment) inst.getTarget (); allTemplates = new ArrayList (); if (fixed != null) { allTemplates.addAll (fixed); } allTemplates.addAll (java.util.Arrays.asList (templates)); setupGraph (); if (setupPotentials) { computeCPFs (); } }
/** * Creates a graphical model for a given instance. * This is called unrolling a dynamic model. */ public UnrolledGraph (Instance inst, Template[] templates, List fixed, boolean setupPotentials) { super (initialCapacity (inst)); instance = inst; fvs = (FeatureVectorSequence) inst.getData (); assignment = (Assignment) inst.getTarget (); allTemplates = new ArrayList (); if (fixed != null) { allTemplates.addAll (fixed); } allTemplates.addAll (java.util.Arrays.asList (templates)); setupGraph (); if (setupPotentials) { computeCPFs (); } }