Search in sources :

Example 1 with MTree

use of mtree.MTree in project iobserve-analysis by research-iobserve.

the class TestHelper method generateMTree.

public static MTree<OpticsData> generateMTree(final List<OpticsData> models) {
    final GraphEditDistance ged = new GraphEditDistance();
    final MTree<OpticsData> mtree = new MTree<>(20, 40, OpticsData.getDistanceFunction(), null);
    for (final OpticsData model : models) {
        mtree.add(model);
    }
    return mtree;
}
Also used : GraphEditDistance(org.iobserve.service.behavior.analysis.clustering.GraphEditDistance) OpticsData(org.iobserve.service.behavior.analysis.clustering.OpticsData) MTree(mtree.MTree)

Example 2 with MTree

use of mtree.MTree in project iobserve-analysis by research-iobserve.

the class OpticsStageTest method runClusterStage.

public static List<OpticsData> runClusterStage(final List<OpticsData> models, final MTree<OpticsData> mTree) {
    // prepare input
    final List<List<OpticsData>> modelsInputList = new ArrayList<>();
    modelsInputList.add(models);
    // prepare input
    final List<MTree<OpticsData>> mTreeInputList = new ArrayList<>();
    mTreeInputList.add(mTree);
    // these are the clustering arguments
    final OpticsStage optics = new OpticsStage(0, 4);
    final List<List<OpticsData>> solutions = new ArrayList<>();
    StageTester.test(optics).and().send(modelsInputList).to(optics.getModelsInputPort()).and().send(mTreeInputList).to(optics.getmTreeInputPort()).and().receive(solutions).from(optics.getOutputPort()).start();
    return solutions.get(0);
}
Also used : ArrayList(java.util.ArrayList) OpticsStage(org.iobserve.service.behavior.analysis.clustering.OpticsStage) ArrayList(java.util.ArrayList) List(java.util.List) MTree(mtree.MTree)

Aggregations

MTree (mtree.MTree)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 GraphEditDistance (org.iobserve.service.behavior.analysis.clustering.GraphEditDistance)1 OpticsData (org.iobserve.service.behavior.analysis.clustering.OpticsData)1 OpticsStage (org.iobserve.service.behavior.analysis.clustering.OpticsStage)1