Skip to content

Commit

Permalink
exercise-frequent-patterns: Fixed a typo (occurence -> occurrence)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominik-probst committed Apr 16, 2024
1 parent a66ced8 commit 2999efe
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions submission/1-Frequent-Patterns.tex
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ \subsection*{Task 1.2 \points{2}}

After the 1-itemsets have been identified, the next step is to count the occurrences of these itemsets in the dataset.

Complete the function \texttt{\_count\_occurences\_of\_itemsets}, which counts the occurrences of all given itemsets in the dataset:
Complete the function \texttt{\_count\_occurrences\_of\_itemsets}, which counts the occurrences of all given itemsets in the dataset:

\vspace*{0.3cm}

\begin{lstlisting}
def _count_occurences_of_itemsets(
def _count_occurrences_of_itemsets(
self, dataset: Dataset, itemsets: Set[Itemset]
) -> ItemsetsWithOccurenceCounts:
) -> ItemsetsWithOccurrenceCounts:
"""
Count the occurrences of the given itemsets in the dataset.

Expand All @@ -143,7 +143,7 @@ \subsection*{Task 1.2 \points{2}}
The itemsets do not need to be present in the dataset.

Returns:
ItemsetsWithOccurenceCounts: A dictionary containing the itemsets as keys and
ItemsetsWithOccurrenceCounts: A dictionary containing the itemsets as keys and
their occurrence counts as values.
"""
# TODO
Expand All @@ -160,7 +160,7 @@ \subsection*{Task 1.2 \points{2}}
\vspace*{0.3cm}

\begin{lstlisting}
pytest tests/apriori/test_count_occurences_of_itemsets.py
pytest tests/apriori/test_count_occurrences_of_itemsets.py
\end{lstlisting}

\vspace*{0.1cm}
Expand All @@ -176,13 +176,13 @@ \subsection*{Task 1.3 \points{2}}
\begin{lstlisting}
def _prune_itemsets_below_min_support(
self,
itemsets_with_occurence_counts: ItemsetsWithOccurenceCounts,
itemsets_with_occurrence_counts: ItemsetsWithOccurrenceCounts,
) -> Set[Itemset]:
"""
Prune itemsets that are below the minimum support threshold.

Parameters:
itemsets_with_occurence_counts (ItemsetsWithOccurenceCounts): A dictionary containing
itemsets_with_occurrence_counts (ItemsetsWithOccurrenceCounts): A dictionary containing
the itemsets as keys and their occurrence counts as values.

Returns:
Expand All @@ -193,7 +193,7 @@ \subsection*{Task 1.3 \points{2}}

\vspace*{0.1cm}

The input consists of an \texttt{ItemsetsWithOccurenceCounts}. The (absolute) minimum support is a member variable of the Apriori object and can therefore be accessed via \texttt{self.min\_support}. You have to return a \texttt{Set[Itemset]}.
The input consists of an \texttt{ItemsetsWithOccurrenceCounts}. The (absolute) minimum support is a member variable of the Apriori object and can therefore be accessed via \texttt{self.min\_support}. You have to return a \texttt{Set[Itemset]}.

You can test whether your implementation is correct by executing the following command in the console:

Expand Down

0 comments on commit 2999efe

Please sign in to comment.