Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBanham committed Aug 25, 2024
1 parent 34ff398 commit 6c9b1b5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions pmkoalas/discovery/agrawal_miner.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
This module is a implementation of the miner present by R. Argrawal in 1997.
This module is a implementation of the miner present by R. Agrawal in 1997.
See the following article for more information about the argrawal miner:\n
See the following article for more information about the agrawal miner:\n
R. Agrawal, D. Gunopulos, and F. Leymann, “Mining process models from workflow
logs,” in EDBT, ser. Lecture Notes in Computer Science, vol. 1377,
Springer, 1998, pp. 469–483.
Expand Down Expand Up @@ -447,7 +447,7 @@ def _check_follows_for(trace:Trace, actB:str, actA:str) -> bool:
def compute_follows_relations(slog:EventLog) -> Set[Tuple[str,str]]:
"""
Returns the set of follows relations for the given trace based on
def.3 in Argrawal et al. 1998. That is each entry in the returned
def.3 in Agrawal et al. 1998. That is each entry in the returned
set (B,A) denotes that activity B follows activity A.
An acitivty B follows activity A if B starts after A in each
Expand Down Expand Up @@ -655,10 +655,10 @@ def strongconnect(node: DependencyNode):

return components

class ArgrawalMinerInstance(DiscoveryTechnique):
class AgrawalMinerInstance(DiscoveryTechnique):
"""
Mines a graph from an simplified event log using the proposed
approach by R. Argrawal D. Gunopulos and F. Leymann in 1998.
approach by R. Agrawal D. Gunopulos and F. Leymann in 1998.
The resulting graph aims to have the following properties:
- completeness, the graph preserves all dependencies between activities
Expand Down Expand Up @@ -750,7 +750,7 @@ def _adjust_traces(self, trace:Trace, prefix:bool, suffix:bool) -> Trace:
def discover(self, slog:EventLog) -> DependencyGraph:
"""
Discovers the dependency graph from the given simplifed event log,
using the proposed approach by R. Argrawal D. Gunopulos and F.
using the proposed approach by R. Agrawal D. Gunopulos and F.
Leymann in 1998.
For discovery, the conceptualisation of a process requires a single
Expand Down Expand Up @@ -799,7 +799,7 @@ def discover(self, slog:EventLog) -> DependencyGraph:
def _discover_special_dag(self, slog:EventLog)-> DependencyGraph:
"""
Discovers the special DAG from the given simplifed event log,
using the proposed approach by R. Argrawal D. et. al. in 1998
using the proposed approach by R. Agrawal D. et. al. in 1998
through algorithm 1.
The algorithm consists of the following steps:
Expand Down Expand Up @@ -831,7 +831,7 @@ def _discover_special_dag(self, slog:EventLog)-> DependencyGraph:
def _discover_general_dag(self, slog:EventLog) -> DependencyGraph:
"""
Discovers the general DAG from the given simplifed event log,
using the proposed approach by R. Argrawal D. et. al. in 1998
using the proposed approach by R. Agrawal D. et. al. in 1998
through algorithm 2.
The algorithm consists of the following steps:
Expand Down Expand Up @@ -888,7 +888,7 @@ def _suffix_repeated_activities(self, trace:Trace) -> Trace:
def _discover_cyclic_dag(self, slog:EventLog) -> DependencyGraph:
"""
Discover the cyclic DAG from the given simplifed event log,
using the proposed approach by R. Argrawal D. et. al. in 1998
using the proposed approach by R. Agrawal D. et. al. in 1998
through algorithm 3.
The algorithm consists of the following steps:
Expand Down
12 changes: 6 additions & 6 deletions tests/discovery/test_agrawal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pmkoalas.simple import Trace
from pmkoalas import dtlog
from pmkoalas._logging import setLevel
from pmkoalas.discovery.agrawal_miner import ArgrawalMinerInstance
from pmkoalas.discovery.agrawal_miner import AgrawalMinerInstance
from pmkoalas.discovery.agrawal_miner import DependencyEdge,DependencyNode
from pmkoalas.discovery.agrawal_miner import DependencyGraph
from pmkoalas.discovery.agrawal_miner import execution_is_consistent
Expand Down Expand Up @@ -225,7 +225,7 @@ def test_consistency(self):
f"Should be consistent with trace ({exec2})"
)

def test_consistency_argrawal(self):
def test_consistency_agrawal(self):
graph = self.fig1
con_exec = dtlog.convertTrace("A C B E")
incon_exec = dtlog.convertTrace("A D B E")
Expand Down Expand Up @@ -413,10 +413,10 @@ def test_repr_is_same(self):
)


class TestArgrawalMinerInstance(unittest.TestCase):
class TestAgrawalMinerInstance(unittest.TestCase):

def setUp(self):
self.miner = ArgrawalMinerInstance()
self.miner = AgrawalMinerInstance()
setLevel(ERROR)

def tearDown(self):
Expand Down Expand Up @@ -638,10 +638,10 @@ def test_compute_cyclic_graph(self):
self.assertEqual(disc_graph.edges(), expected_graph.edges())
self.assertEqual(disc_graph, expected_graph)

class TestArgrawalMinerInstanceOpt(TestArgrawalMinerInstance):
class TestAgrawalMinerInstanceOpt(TestAgrawalMinerInstance):

def setUp(self):
self.miner = ArgrawalMinerInstance(
self.miner = AgrawalMinerInstance(
optimise_step_five=True
)
setLevel(ERROR)
Expand Down

0 comments on commit 6c9b1b5

Please sign in to comment.