当前位置: 首页>>代码示例>>Java>>正文


Java XLog.clear方法代码示例

本文整理汇总了Java中org.deckfour.xes.model.XLog.clear方法的典型用法代码示例。如果您正苦于以下问题:Java XLog.clear方法的具体用法?Java XLog.clear怎么用?Java XLog.clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.deckfour.xes.model.XLog的用法示例。


在下文中一共展示了XLog.clear方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateNewLog

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
@Override
public XLog generateNewLog(XLog log, OutlierIdentifierGenerator<String> outlierIdentifierGenerator, int lookAHead, boolean selectOnlyOneOutlier) {
    boolean outlearsFound = false;
    if(mapOutliers.size() > 0) {
        outlearsFound = true;
    }

    if(outlearsFound) {
        XLog newLog = (XLog) log.clone();
        newLog.clear();

        for (XTrace t : log) {
            XTrace newT = (XTrace) t.clone();
            newT.clear();

            newT.add((XEvent) t.get(0).clone());
            for (int i = 1; i < t.size() - 1; i++) {
                if(selectOnlyOneOutlier) {
                    removeOutlierSelectOnlyOne(t, newT, i);
                }else {
                    removeOutlierSelect(t, newT, i);
                }
            }
            newT.add((XEvent) t.get(t.size()-1).clone());
            if(newT.size() > 0) newLog.add(newT);
        }

        return newLog;
    }else {
        return log;
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:33,代码来源:OutlierRemoverBridge.java

示例2: generateNewLog

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
@Override
public XLog generateNewLog(XLog log, OutlierIdentifierGenerator<String> outlierIdentifierGenerator, int lookAHead, boolean selectOnlyOneOutlier) {
    boolean outlearsFound = false;
    if(mapOutliers.size() > 0) {
        outlearsFound = true;
    }

    if(outlearsFound) {
        XLog newLog = (XLog) log.clone();
        newLog.clear();

        for (XTrace t : log) {
            XTrace newT = (XTrace) t.clone();
            newT.clear();

            for (int i = 0; i < lookAHead && i < t.size(); i++) {
                XEvent current = (XEvent) t.get(i).clone();
                newT.add(current);
            }

            for (int i = lookAHead; i < t.size(); i++) {
                if(selectOnlyOneOutlier) {
                    removeOutlierSelectOnlyOne(t, newT, i, lookAHead, true);
                }else {
                    removeOutlierSelect(t, newT, i, lookAHead, true);
                }
            }
            if(newT.size() > 0) newLog.add(newT);
        }

        return newLog;
    }else {
        return log;
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:36,代码来源:OutlierRemoverNextAndPrevious.java

示例3: generateNewLogReverse

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
@Override
public XLog generateNewLogReverse(XLog log, OutlierIdentifierGenerator<String> outlierIdentifierGenerator, int lookAHead, boolean selectOnlyOneOutlier) {
    boolean outlearsFound = false;
    if(mapOutliers.size() > 0) {
        outlearsFound = true;
    }

    if(outlearsFound) {
        XLog newLog = (XLog) log.clone();
        newLog.clear();

        for (XTrace t : log) {
            XTrace newT = (XTrace) t.clone();
            newT.clear();

            for (int i = t.size() - 1; i >= t.size() - lookAHead && i >= 0; i--) {
                XEvent current = (XEvent) t.get(i).clone();
                newT.add(current);
            }

            for (int i = t.size() - lookAHead - 1; i >= 0; i--) {
                if(selectOnlyOneOutlier) {
                    removeOutlierSelectOnlyOne(t, newT, i, lookAHead, true);
                }else {
                    removeOutlierSelect(t, newT, i, lookAHead, true);
                }
            }
            if(newT.size() > 0) newLog.add(newT);
        }

        return newLog;
    }else {
        return log;
    }
}
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:36,代码来源:OutlierRemoverNextAndPrevious.java

示例4: filterLog

import org.deckfour.xes.model.XLog; //导入方法依赖的package包/类
public XLog filterLog(XLog rawlog) {

        XLog log = rawlog;
        XFactory factory = new XFactoryNaiveImpl();
        LogOptimizer logOptimizer = new LogOptimizer();
        log = logOptimizer.optimizeLog(log);

        LogModifier logModifier = new LogModifier(factory, XConceptExtension.instance(), XTimeExtension.instance(), logOptimizer);
        logModifier.insertArtificialStartAndEndEvent(log);

        Automaton<String> automatonOriginal = automatonFactory.generate(log);
        Automaton<String> lastAutomaton = null;
        Automaton<String> automaton;

        double[] arcs = discoverArcs(automatonOriginal, 1.0);
        double noiseThreshold = discoverThreshold(arcs, 0.125);
        Set<Node<String>> requiredStates = automatonOriginal.getNodes();

        double lowerbound = 0.0;
        double upperbound = noiseThreshold;

        XLog log2 = rawlog;
        int events;
        int newEvents = countEvents(log2);

        UIPluginContext context = new FakePluginContext();
        do {
            automaton = getFilteredAutomaton(automatonOriginal, requiredStates, noiseThreshold);

            if (lastAutomaton == null || !automaton.equals(lastAutomaton)) {
                try {
                    finalLog = AutomatonInfrequentBehaviourRemover.removeInfrequentBehaviour(context, xEventClassifier, log, automaton, lowerbound, upperbound, true, true);
                    finalThreshold = noiseThreshold;
                } catch (HighThresholdException e) {
                    noiseThreshold = roundNumber(findBestUpperbound(context, log, requiredStates, upperbound/2, upperbound, true));
                }
            }

            if(finalThreshold == noiseThreshold && finalLog != null) {
                log2 = finalLog;
            }else {
                try {
                    automaton = getFilteredAutomaton(automatonOriginal, requiredStates, noiseThreshold);
                    log2 = AutomatonInfrequentBehaviourRemover.removeInfrequentBehaviour(context, xEventClassifier, log, automaton, 0, noiseThreshold, true, true);
                } catch (HighThresholdException hte) {
                    log.clear();
                    return log;
                }
            }
            events = newEvents;
            newEvents = countEvents(log2);
        }while (newEvents < events);

        logModifier.removeArtificialStartAndEndEvent(log2);

        return log2;
    }
 
开发者ID:raffaeleconforti,项目名称:ResearchCode,代码行数:58,代码来源:InfrequentBehaviourFilter.java


注:本文中的org.deckfour.xes.model.XLog.clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。