Examples of SparseMap


Examples of joshua.discriminative.semiring_parsingv2.pmodule.SparseMap

  @Override
  protected ExpectationSemiringPM<LogSemiring, RiskAndEntropyPM, ListPM, ListPM, MinRiskDABO>
 
  createNewXWeight() {   
    ListPM s = new ListPM( new SparseMap() );   
    ListPM t = new ListPM( new SparseMap() );   
    return new ExpectationSemiringPM<LogSemiring, RiskAndEntropyPM, ListPM, ListPM,  MinRiskDABO>( s, t,  pBilinearOperator);
  }
View Full Code Here

Examples of joshua.discriminative.semiring_parsingv2.pmodule.SparseMap

        SignedValue.createSignedValueFromRealNumber(rEntropy),
        SignedValue.createSignedValueFromRealNumber(rRisk)
    );*/
       
     
    SparseMap gradientsMap = getFeatureForest().getGradientSparseMap(parentItem, dt, logProb);
    ListPM s = new ListPM( gradientsMap );
   
 
    //== t = L_e * (P_e)' - temperature * (1+logP_e) (P_e)' = (P_e)' * ( L_e - temperature * (1+logP_e) )
    //ListPM t = pBilinearOperator.bilinearMulti(r, s);
View Full Code Here

Examples of joshua.discriminative.semiring_parsingv2.pmodule.SparseMap

public class MinRiskDABO  implements BilinearOperator<RiskAndEntropyPM, ListPM, ListPM>{

  public ListPM bilinearMulti(RiskAndEntropyPM r, ListPM s) {
   
    //== get SparseArray
    SparseMap res = s.getValue().duplicate();
    for(SignedValue signedVal : res.getValues())
      signedVal.multi(r.getValue());   
   
   
    return new ListPM(res);
  }
View Full Code Here

Examples of joshua.discriminative.semiring_parsingv2.pmodule.SparseMap

 
 
  public ListPM bilinearMulti(SignedValue r, ListPM s) {
   
    //== get SparseArray
    SparseMap res = s.getValue().duplicate();
    for(SignedValue signedVal : res.getValues())
      signedVal.multi(r);   
   
    return new ListPM(res);
  }
View Full Code Here

Examples of joshua.discriminative.semiring_parsingv2.pmodule.SparseMap

      logGradient.multiLogNumber(logTransitionProb);
     
      gradientsMap.put(featID, logGradient);
    }
   
    return new SparseMap(gradientsMap);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.