Search in sources :

Example 16 with BehaviorModelGED

use of org.iobserve.service.behavior.analysis.model.BehaviorModelGED in project iobserve-analysis by research-iobserve.

the class GraphEditDistanceTest method distanceToIdenticalModelIsZeroTest.

@Test
public void distanceToIdenticalModelIsZeroTest() {
    BehaviorModelGED model1 = TestHelper.createBehaviorModelA();
    BehaviorModelGED model2 = TestHelper.createBehaviorModelA();
    MatcherAssert.assertThat(this.ged.calculate(model1, model2), Matchers.is(0.0));
    model1 = TestHelper.createBehaviorModelB();
    model2 = TestHelper.createBehaviorModelB();
    MatcherAssert.assertThat(this.ged.calculate(model1, model2), Matchers.is(0.0));
    model1 = TestHelper.createBehaviorModelC();
    model2 = TestHelper.createBehaviorModelC();
    MatcherAssert.assertThat(this.ged.calculate(model1, model2), Matchers.is(0.0));
    model1 = TestHelper.createBehaviorModelD();
    model2 = TestHelper.createBehaviorModelD();
    MatcherAssert.assertThat(this.ged.calculate(model1, model2), Matchers.is(0.0));
    model1 = TestHelper.createBehaviorModelE();
    model2 = TestHelper.createBehaviorModelE();
    MatcherAssert.assertThat(this.ged.calculate(model1, model2), Matchers.is(0.0));
}
Also used : BehaviorModelGED(org.iobserve.service.behavior.analysis.model.BehaviorModelGED) Test(org.junit.Test)

Example 17 with BehaviorModelGED

use of org.iobserve.service.behavior.analysis.model.BehaviorModelGED in project iobserve-analysis by research-iobserve.

the class GraphEditDistanceTest method nodeRelevantTest.

@Test
public void nodeRelevantTest() {
    final BehaviorModelGED model1 = TestHelper.createBehaviorModelA();
    final BehaviorModelGED model2 = TestHelper.createBehaviorModelE();
    Assert.assertTrue(this.ged.calculate(model1, model2) > 0);
}
Also used : BehaviorModelGED(org.iobserve.service.behavior.analysis.model.BehaviorModelGED) Test(org.junit.Test)

Aggregations

BehaviorModelGED (org.iobserve.service.behavior.analysis.model.BehaviorModelGED)17 BehaviorModelEdge (org.iobserve.service.behavior.analysis.model.BehaviorModelEdge)7 Test (org.junit.Test)7 BehaviorModelNode (org.iobserve.service.behavior.analysis.model.BehaviorModelNode)3 ArrayList (java.util.ArrayList)2 PayloadAwareEntryCallEvent (org.iobserve.stages.general.data.PayloadAwareEntryCallEvent)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 IOException (java.io.IOException)1 OpticsData (org.iobserve.service.behavior.analysis.clustering.OpticsData)1 EventGroup (org.iobserve.service.behavior.analysis.model.EventGroup)1 EntryCallEvent (org.iobserve.stages.general.data.EntryCallEvent)1 Before (org.junit.Before)1