public Void call() throws Exception { for (int ii = start; ii < end; ii++) { if (instancesWithConstraints.get(ii)) { SumLattice lattice = lattices.get(ii); FeatureVectorSequence fvs = (FeatureVectorSequence)data.get(ii).getData(); new GELattice(fvs, lattice.getGammas(), lattice.getXis(), crf, reverseTrans, reverseTransIndices, gradient,this.constraints, false); } } return null; } }
public Void call() throws Exception { for (int ii = start; ii < end; ii++) { if (instancesWithConstraints.get(ii)) { SumLattice lattice = lattices.get(ii); FeatureVectorSequence fvs = (FeatureVectorSequence)data.get(ii).getData(); new GELattice(fvs, lattice.getGammas(), lattice.getXis(), crf, reverseTrans, reverseTransIndices, gradient,this.constraints, false); } } return null; } }
public Void call() throws Exception { for (int ii = start; ii < end; ii++) { if (instancesWithConstraints.get(ii)) { SumLattice lattice = lattices.get(ii); FeatureVectorSequence fvs = (FeatureVectorSequence)data.get(ii).getData(); new GELattice(fvs, lattice.getGammas(), lattice.getXis(), crf, reverseTrans, reverseTransIndices, gradient,this.constraints, false); } } return null; } }
SumLattice lattice = lattices.get(ii); FeatureVectorSequence fvs = (FeatureVectorSequence)data.get(ii).getData(); new GELattice(fvs, lattice.getGammas(), lattice.getXis(), crf, reverseTrans, reverseTransIndices, cachedGradient,this.constraints, false);
SumLattice lattice = lattices.get(ii); FeatureVectorSequence fvs = (FeatureVectorSequence)data.get(ii).getData(); new GELattice(fvs, lattice.getGammas(), lattice.getXis(), crf, reverseTrans, reverseTransIndices, cachedGradient,this.constraints, false);
SumLattice lattice = lattices.get(ii); FeatureVectorSequence fvs = (FeatureVectorSequence)data.get(ii).getData(); new GELattice(fvs, lattice.getGammas(), lattice.getXis(), crf, reverseTrans, reverseTransIndices, cachedGradient,this.constraints, false);
/** * Resets, computes and fills expectations from all instances, also updating * the entropy value. <p> * * Analogous to <tt>CRFOptimizableByLabelLikelihood.getExpectationValue<tt>. */ public void computeExpectations() { expectations.zero(); // now, update the expectations due to each instance for entropy reg. for (int ii = 0; ii < data.size(); ii++) { FeatureVectorSequence input = (FeatureVectorSequence) data.get(ii).getData(); SumLattice lattice = new SumLatticeDefault(crf,input, true); // udpate the expectations EntropyLattice entropyLattice = new EntropyLattice( input, lattice.getGammas(), lattice.getXis(), crf, incrementor, scalingFactor); cachedValue += entropyLattice.getEntropy(); } }
/** * Resets, computes and fills expectations from all instances, also updating * the entropy value. <p> * * Analogous to <tt>CRFOptimizableByLabelLikelihood.getExpectationValue<tt>. */ public void computeExpectations() { expectations.zero(); // now, update the expectations due to each instance for entropy reg. for (int ii = 0; ii < data.size(); ii++) { FeatureVectorSequence input = (FeatureVectorSequence) data.get(ii).getData(); SumLattice lattice = new SumLatticeDefault(crf,input, true); // udpate the expectations EntropyLattice entropyLattice = new EntropyLattice( input, lattice.getGammas(), lattice.getXis(), crf, incrementor, scalingFactor); cachedValue += entropyLattice.getEntropy(); } }
/** * Resets, computes and fills expectations from all instances, also updating * the entropy value. <p> * * Analogous to <tt>CRFOptimizableByLabelLikelihood.getExpectationValue<tt>. */ public void computeExpectations() { expectations.zero(); // now, update the expectations due to each instance for entropy reg. for (int ii = 0; ii < data.size(); ii++) { FeatureVectorSequence input = (FeatureVectorSequence) data.get(ii).getData(); SumLattice lattice = new SumLatticeDefault(crf,input, true); // udpate the expectations EntropyLattice entropyLattice = new EntropyLattice( input, lattice.getGammas(), lattice.getXis(), crf, incrementor, scalingFactor); cachedValue += entropyLattice.getEntropy(); } }
SumLattice lattice = lattices.get(i); FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput(); gammas = lattice.getGammas(); for (int ip = 0; ip < fvs.size(); ++ip) { cache.resetQuick();
SumLattice lattice = lattices.get(i); FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput(); gammas = lattice.getGammas(); for (int ip = 0; ip < fvs.size(); ++ip) { cache.resetQuick();
SumLattice lattice = lattices.get(i); FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput(); gammas = lattice.getGammas(); for (int ip = 0; ip < fvs.size(); ++ip) { cache.resetQuick();
SumLattice lattice = lattices.get(i); FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput(); gammas = lattice.getGammas(); for (int ip = 0; ip < fvs.size(); ++ip) { cache.resetQuick();
SumLattice lattice = lattices.get(i); FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput(); gammas = lattice.getGammas(); for (int ip = 0; ip < fvs.size(); ++ip) { cache.resetQuick();
SumLattice lattice = lattices.get(i); FeatureVectorSequence fvs = (FeatureVectorSequence)lattice.getInput(); gammas = lattice.getGammas(); for (int ip = 0; ip < fvs.size(); ++ip) { cache.resetQuick();