當前位置: 首頁>>代碼示例>>Java>>正文


Java ARMConfigurationInt類代碼示例

本文整理匯總了Java中org.easyrec.plugin.arm.model.ARMConfigurationInt的典型用法代碼示例。如果您正苦於以下問題:Java ARMConfigurationInt類的具體用法?Java ARMConfigurationInt怎麽用?Java ARMConfigurationInt使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ARMConfigurationInt類屬於org.easyrec.plugin.arm.model包,在下文中一共展示了ARMConfigurationInt類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getNumberOfBaskets

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public Integer getNumberOfBaskets(ARMConfigurationInt configuration) {

    if (configuration.getExcludeSingleItemBaskests()) {
        return ruleminingActionDAO.getNumberOfBasketsESIB(configuration.getTenantId(), configuration.getActionType(), configuration.getRatingNeutral(), configuration.getItemTypes(), configuration.getCutoffId());
    } else {
        return ruleminingActionDAO.getNumberOfBaskets(configuration.getTenantId(), configuration.getActionType(), configuration.getRatingNeutral(), configuration.getItemTypes(), configuration.getCutoffId());
    }
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:10,代碼來源:AssocRuleMiningServiceImpl.java

示例2: removeOldRules

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public void removeOldRules(ARMConfigurationInt configuration,
                           ARMStatistics stats) {

    itemAssocDAO.removeItemAssocByTenant(configuration.getTenantId(), configuration.getAssocType(),
            typeMappingService.getIdOfSourceType(configuration.getTenantId(), ARMGenerator.ID.toString() + "/" + ARMGenerator.VERSION),
            stats.getStartDate());
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:9,代碼來源:AssocRuleMiningServiceImpl.java

示例3: evaluateRuncondition

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public boolean evaluateRuncondition(Date lastRun) {
    
    if (lastRun == null) return true; // never run before so execute anyway+
    ARMConfigurationInt intConfiguration;
    try {
        intConfiguration = assocRuleMiningService.mapTypesToConfiguration(getConfiguration(), null);
    } catch (Exception ex) {
        logger.info("error in mapping configuration during evaluation of runcondition! Execution cancelled!");
        intConfiguration = null;
    }
    if (intConfiguration == null) return false; // if configuration cannot be mapped, no execution necessary
    int actionsSinceLastRun = assocRuleMiningService.getNumberOfActions(intConfiguration, lastRun);
    return actionsSinceLastRun >= 1;
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:16,代碼來源:ARMGenerator.java

示例4: getNumberOfBaskets

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public Integer getNumberOfBaskets(ARMConfigurationInt configuration) {

        if (configuration.getExcludeSingleItemBaskests()) {
            return ruleminingActionDAO.getNumberOfBasketsESIB(configuration.getTenantId(), configuration.getActionType(), configuration.getRatingNeutral(), configuration.getItemTypes());
        } else {
            return ruleminingActionDAO.getNumberOfBaskets(configuration.getTenantId(), configuration.getActionType(), configuration.getRatingNeutral(), configuration.getItemTypes());
        }
    }
 
開發者ID:customertimes,項目名稱:easyrec-PoC,代碼行數:9,代碼來源:AssocRuleMiningServiceImpl.java

示例5: removeOldRules

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public void removeOldRules(ARMConfigurationInt configuration,
                           ARMStatistics stats) {

    itemAssocDAO.removeItemAssocByTenant(configuration.getTenantId(), configuration.getAssocType(),
            typeMappingService.getIdOfSourceType(configuration.getTenantId(), ARMGenerator.ID.toString() + "/" + ARMGenerator.VERSION),
            stats.getStartDate());
}
 
開發者ID:customertimes,項目名稱:easyrec-PoC,代碼行數:8,代碼來源:AssocRuleMiningServiceImpl.java

示例6: createRules

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public List<ItemAssocVO<Integer,Integer>> createRules(List<TupleVO> tuples,
TObjectIntHashMap<ItemVO<Integer, Integer>> L1,
ARMConfigurationInt configuration,
ARMStatistics stats,
Double minConfidence);
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:6,代碼來源:AssocRuleMiningService.java

示例7: createBestRules

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public Collection<SortedSet<ItemAssocVO<Integer,Integer>>> createBestRules(List<TupleVO> tuples,
TObjectIntHashMap<ItemVO<Integer, Integer>> L1,
ARMConfigurationInt configuration,
ARMStatistics stats,
Double minConfidence);
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:6,代碼來源:AssocRuleMiningService.java

示例8: getNumberOfProducts

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public Integer getNumberOfProducts(ARMConfigurationInt configuration) {

    return ruleminingActionDAO.getNumberOfProducts(configuration.getTenantId(), configuration.getActionType(), configuration.getRatingNeutral(), configuration.getItemTypes(), configuration.getCutoffId());
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:6,代碼來源:AssocRuleMiningServiceImpl.java

示例9: getNumberOfActions

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public Integer getNumberOfActions(ARMConfigurationInt configuration, Date lastRun) {

    return ruleminingActionDAO.getNumberOfActions(configuration.getTenantId(), configuration.getActionType(), lastRun, configuration.getCutoffId());
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:6,代碼來源:AssocRuleMiningServiceImpl.java

示例10: defineL2

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public List<TupleVO> defineL2(TObjectIntHashMap<ItemVO<Integer, Integer>> L1, TupleCounter tupleCounter, ARMConfigurationInt configuration, ARMStatistics stats) {

    return ruleminingActionDAO.defineL2(L1, tupleCounter, configuration, stats);
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:6,代碼來源:AssocRuleMiningServiceImpl.java

示例11: defineL2

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public List<TupleVO> defineL2(TObjectIntHashMap<ItemVO<Integer, Integer>> L1,
TupleCounter tupleCounter,
ARMConfigurationInt configuration,
ARMStatistics stats);
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:5,代碼來源:RuleminingActionDAO.java

示例12: defineL1

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public TObjectIntHashMap<ItemVO<Integer, Integer>> defineL1(ARMConfigurationInt configuration, int offset, int batchSize) {
    ActionResultSetExtractor rse = new ActionResultSetExtractor();

    List<Object> args = Lists.newArrayList();
    List<Integer> argt = Lists.newArrayList();

    StringBuilder query = new StringBuilder("SELECT ");
    query.append(BaseActionDAO.DEFAULT_ITEM_COLUMN_NAME).append(", ");
    query.append(BaseActionDAO.DEFAULT_ITEM_TYPE_COLUMN_NAME).append(", ");
    query.append(BaseActionDAO.DEFAULT_TENANT_COLUMN_NAME).append(", ");
    query.append("count(*) as cnt FROM ");
    query.append(BaseActionDAO.DEFAULT_TABLE_NAME);
    query.append(" WHERE ").append(BaseActionDAO.DEFAULT_TENANT_COLUMN_NAME).append("=")
            .append(configuration.getTenantId());
    query.append(" AND ").append(BaseActionDAO.DEFAULT_ACTION_TYPE_COLUMN_NAME).append("=")
            .append(configuration.getActionType());

    if (configuration.getRatingNeutral() != null) {
        query.append(" AND ").append(BaseActionDAO.DEFAULT_RATING_VALUE_COLUMN_NAME).append(">")
                .append(configuration.getRatingNeutral());
    }
    
    if (!configuration.getItemTypes().isEmpty()) {
    query.append(" AND ").append(BaseActionDAO.DEFAULT_ITEM_TYPE_COLUMN_NAME).append(" IN (");

        for (int i = 0; i < configuration.getItemTypes().size(); i++) {
            query.append("?");
            args.add(configuration.getItemTypes().get(i));
            argt.add(Types.INTEGER);
            if (i < configuration.getItemTypes().size() - 1) {
                query.append(",");
            } else {
                query.append(")");
            }
        }
    }
    query.append(" GROUP BY ").append(BaseActionDAO.DEFAULT_ITEM_COLUMN_NAME).append(",").append(BaseActionDAO.DEFAULT_ITEM_TYPE_COLUMN_NAME)
            .append(" HAVING cnt >= ? ORDER BY cnt DESC");

    args.add(configuration.getSupport());
    argt.add(Types.INTEGER);

    query.append(" LIMIT ?,?");

    args.add(offset);
    argt.add(Types.INTEGER);

    args.add(Math.min(offset+batchSize, configuration.getMaxSizeL1()));
    argt.add(Types.INTEGER);
    
    TObjectIntHashMap<ItemVO<Integer, Integer>> ret = getJdbcTemplate()
            .query(query.toString(),  args.toArray(), Ints.toArray(argt), rse);

    return ret;
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:57,代碼來源:RuleminingActionDAOMysqlImpl.java

示例13: defineL1

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public TObjectIntHashMap<ItemVO<Integer, Integer>> defineL1(ARMConfigurationInt configuration) {
    ActionResultSetExtractor rse = new ActionResultSetExtractor();

    List<Object> args = Lists.newArrayList();
    List<Integer> argt = Lists.newArrayList();

    StringBuilder query = new StringBuilder("SELECT ");
    query.append(BaseActionDAO.DEFAULT_ITEM_COLUMN_NAME).append(", ");
    query.append(BaseActionDAO.DEFAULT_ITEM_TYPE_COLUMN_NAME).append(", ");
    query.append(BaseActionDAO.DEFAULT_TENANT_COLUMN_NAME).append(", ");
    query.append("count(*) as cnt FROM ");
    query.append(BaseActionDAO.DEFAULT_TABLE_NAME);
    query.append(" WHERE ").append(BaseActionDAO.DEFAULT_TENANT_COLUMN_NAME).append("=")
            .append(configuration.getTenantId());
    query.append(" AND ").append(BaseActionDAO.DEFAULT_ACTION_TYPE_COLUMN_NAME).append("=")
            .append(configuration.getActionType());

    if (configuration.getRatingNeutral() != null) {
        query.append(" AND ").append(BaseActionDAO.DEFAULT_RATING_VALUE_COLUMN_NAME).append(">")
                .append(configuration.getRatingNeutral());
    }
    
    if (!configuration.getItemTypes().isEmpty()) {
    query.append(" AND ").append(BaseActionDAO.DEFAULT_ITEM_TYPE_COLUMN_NAME).append(" IN (");

        for (int i = 0; i < configuration.getItemTypes().size(); i++) {
            query.append("?");
            args.add(configuration.getItemTypes().get(i));
            argt.add(Types.INTEGER);
            if (i < configuration.getItemTypes().size() - 1) {
                query.append(",");
            } else {
                query.append(")");
            }
        }
    }
    query.append(" GROUP BY ").append(BaseActionDAO.DEFAULT_ITEM_COLUMN_NAME).append(",").append(BaseActionDAO.DEFAULT_ITEM_TYPE_COLUMN_NAME)
            .append(" HAVING cnt >= ? ORDER BY cnt DESC");

    args.add(configuration.getSupport());
    argt.add(Types.INTEGER);

    query.append(" LIMIT ?");

    args.add(configuration.getMaxSizeL1());
    argt.add(Types.INTEGER);
    
    TObjectIntHashMap<ItemVO<Integer, Integer>> ret = getJdbcTemplate()
            .query(query.toString(),  args.toArray(), Ints.toArray(argt), rse);

    //if (ret.size() == configuration.getMaxSizeL1()) configuration.setSupport(rse.getMinSupp());

    return ret;
}
 
開發者ID:customertimes,項目名稱:easyrec-PoC,代碼行數:55,代碼來源:RuleminingActionDAOMysqlImpl.java

示例14: defineL1

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
@Override
public TObjectIntHashMap<ItemVO<Integer, Integer>> defineL1(ARMConfigurationInt configuration, int offset, int batchSize) {


    return ruleminingActionDAO.defineL1(configuration, offset, batchSize);
}
 
開發者ID:major2015,項目名稱:easyrec_major,代碼行數:7,代碼來源:AssocRuleMiningServiceImpl.java

示例15: getNumberOfProducts

import org.easyrec.plugin.arm.model.ARMConfigurationInt; //導入依賴的package包/類
public Integer getNumberOfProducts(ARMConfigurationInt configuration) {

        return ruleminingActionDAO.getNumberOfProducts(configuration.getTenantId(), configuration.getActionType(), configuration.getRatingNeutral(), configuration.getItemTypes());
    }
 
開發者ID:customertimes,項目名稱:easyrec-PoC,代碼行數:5,代碼來源:AssocRuleMiningServiceImpl.java


注:本文中的org.easyrec.plugin.arm.model.ARMConfigurationInt類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。