Examples of AssociationRuleType


Examples of org.dmg.pmml._40.AssociationRuleType

            allItemsets.add(myPremise);
         
          if(!allItemsets.contains(myConsequence))
            allItemsets.add(myConsequence);
         
          AssociationRuleType ruleType = _40Factory.eINSTANCE.createAssociationRuleType();
          ruleType.setAntecedent(String.valueOf(allItemsets.indexOf(myPremise)));
          ruleType.setConsequent(String.valueOf(allItemsets.indexOf(myConsequence)));
          try {
           
            //ruleType.setSupport(BigDecimal.valueOf(r.getTotalSupport()));
            ruleType.setSupport(BigDecimal.valueOf(Math.random()));
            ruleType.setConfidence(BigDecimal.valueOf(r.getNamedMetricValue("Confidence")));
            ruleType.setLift(BigDecimal.valueOf(r.getNamedMetricValue("Lift")).floatValue());
           
          }
          catch(Exception exc) {
            exc.printStackTrace();
          }
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.