\documentclass{beamer}
% \documentclass[handout]{beamer}

\usetheme{dcc}

\usepackage[utf8]{inputenc}
\usepackage[american]{babel}

\newcommand{\ie}{i.\,e.}
\newcommand{\Ie}{I.\,e.}
\newcommand{\eg}{e.\,g.}
\newcommand{\Eg}{E.\,g.}

\title{Mineração de Dados Aplicada}
\subtitle{Itemset Mining}

\author{Loïc Cerf}

\date{May 21st 2025}

\institute
{
  \scriptsize
  DCC -- ICEx -- UFMG
  \bigskip\\
  \includegraphics[width=.334113288\linewidth]{images/dcc}\hfill\includegraphics[width=.5\linewidth]{images/ufmg}
}

\subject{Itemset Mining}

\keywords{itemset, frequency, maximal itemset, closed itemset, lift}

\hypersetup{pdfpagemode=FullScreen}

\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Outline}
    \tableofcontents[currentsection]
  \end{frame}
}

\begin{document}

\begin{frame}[plain]
  \titlepage
\end{frame}

\begin{frame}
  \frametitle{Outline for the next sessions}
  \begin{description}
  \item[Today] Itemset mining;
  \item[26/05] Association rule mining;
  \item[28/05] Oral presentations.
  \end{description}

  \vfill

  Partial reports for May 28th (4 pages).
\end{frame}

\begin{frame}
  \frametitle{Outline for this session}
  \tableofcontents
\end{frame}

\section{Frequent itemset mining}

\begin{frame}
  \frametitle{Two applications}
  \begin{exampleblock}{Log analysis}
    A log lists the Web pages every visitor accessed during every
    session. What are the pages that are frequently loaded during a
    same session?
  \end{exampleblock}

  \vfill
  \pause

  \begin{exampleblock}{Basket analysis}
    A shop knows what products were bought together. Which ones are
    frequently bought together?
  \end{exampleblock}
\end{frame}

\begin{frame}
  \frametitle{Itemset: definition}
  \begin{definition}
    Given a set of Boolean attributes $\mathcal{A}$, an \emph{itemset}
    $X$ is a subset of attributes, \ie, $X \subseteq \mathcal{A}$.
  \end{definition}

  \vfill

  Input:\\
  \begin{columns}
    \begin{column}{.5\linewidth}
      \begin{displaymath}
        \begin{array}{c|cccc}
          & a_1 & a_2 & \dots & a_n\\
          \hline
          o_1 & d_{1, 1} & d_{1, 2} & \dots & d_{1, n}\\
          o_2 & d_{2, 1} & d_{2, 2} & \dots & d_{2, n}\\
          \vdots & \vdots & \vdots & \ddots & \vdots\\
          o_m & d_{m, 1} & d_{m, 2} & \dots & d_{m, n}
        \end{array}
      \end{displaymath}
      where every $d_{i, j} \in \{$true$, $false$\}$
    \end{column}
    \begin{column}{.5\linewidth}
      \begin{alertblock}{Question}
        How many itemsets are there?\uncover<2>{ $2^{|\mathcal{A}|}$.}
      \end{alertblock}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Support: definition}
  \begin{definition}
    Given $\mathcal{D}$, a set of objects $\mathcal{O}$ described with
    Boolean attributes in $\mathcal{A}$, the \emph{support} of an
    itemset $X \subseteq \mathcal{A}$ in $\mathcal{D}$ is:
    \begin{displaymath}
      \{o \in \mathcal{O} \mid \forall x \in X, d_{o, x}\}
    \end{displaymath}
  \end{definition}
\end{frame}

\begin{frame}
  \frametitle{Frequency: definition}
  \begin{block}{Definition (\only<1>{absolute}\only<2->{relative}
      frequency)}
    Given $\mathcal{D}$, a set of objects $\mathcal{O}$ described with
    Boolean attributes in $\mathcal{A}$, the
    \emph{\only<1>{absolute}\only<2->{relative} frequency} of an
    itemset $X \subseteq \mathcal{A}$ in $\mathcal{D}$ is:
    \begin{displaymath}
      \only<1>{|\{o \in \mathcal{O} \mid \forall x \in X, d_{o,
          x}\}|}\only<2->{\frac{|\{o \in \mathcal{O} \mid \forall x
          \in X, d_{o, x}\}|}{|\mathcal{O}|}}
    \end{displaymath}
  \end{block}

  \vfill

  \uncover<3>{The relative frequency of the itemset $X$ is the
    estimated joint probability of having all attributes in $X$.}
\end{frame}

\begin{frame}
  \frametitle{Frequent itemset mining}
  \begin{definition}
    Given $\mathcal{D}$, a set of objects described with Boolean
    attributes in $\mathcal{A}$ and $\mu \in \mathbb{N}$, listing
    every itemset whose frequency is at least $\mu$.
  \end{definition}

  \vfill

  \only<1>
  {
    Input:\\
    \begin{columns}
      \begin{column}{.5\linewidth}
        \begin{displaymath}
          \begin{array}{c|cccc}
            & a_1 & a_2 & \dots & a_n\\
            \hline
            o_1 & d_{1, 1} & d_{1, 2} & \dots & d_{1, n}\\
            o_2 & d_{2, 1} & d_{2, 2} & \dots & d_{2, n}\\
            \vdots & \vdots & \vdots & \ddots & \vdots\\
            o_m & d_{m, 1} & d_{m, 2} & \dots & d_{m, n}
          \end{array}
        \end{displaymath}
        where every $d_{i, j} \in \{$true$, $false$\}$
      \end{column}
      \begin{column}{.5\linewidth}
        and a minimal frequency $\mu \in \mathbb{N}$.
      \end{column}
    \end{columns}
  }\only<2->
  {
    Output: \emph{every} $X \subseteq \mathcal{A}$ such that at least
    $\mu$ objects have ``true'' values for all attributes in $X$.
  }
\end{frame}

\begin{frame}
  \frametitle{Frequent itemset mining: illustration}
  Let $2$ the minimal absolute frequency or, equivalently, 50\% the
  minimal relative frequency.

  \vfill

  \begin{columns}
    \begin{column}{.33\linewidth}
      \begin{displaymath}
        \begin{array}{c|ccc}
          & a_1 & a_2 & a_3\\
          \hline
          o_1 & \times & \times & \times\\
          o_2 & \times & \times & \\
          o_3 & & \times & \\
          o_4 & & & \times
        \end{array}
      \end{displaymath}
    \end{column}
    \begin{column}{.66\linewidth}
      \only<2>
      {
        The frequent itemsets are $\emptyset$ (4), $\{a_1\}$ (2),
        $\{a_2\}$ (3), $\{a_3\}$ (2) and $\{a_1, a_2\}$ (2).
      }
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Completeness}
  Estimating the parameters of a clustering or a classification model
  is \emph{globally} modeling the data.  Since every object influences
  the output, the optimal estimates are usually unreachable within a
  reasonable time and those problems are \emph{inexactly} solved.

  \vfill
  \pause

  In contrast, \emph{local} patterns, such as itemsets, are
  ``anomalies'' in the data.  Oftentimes, those anomalies can be
  \emph{completely} listed.

  \vfill
  \pause

  Anyway, in the worst case, listing the frequent itemsets takes
  $O(2^{|\mathcal{A}|})$ time and counting them is \#P-complete.
\end{frame}

\begin{frame}
  \frametitle{Inductive database vision}
  \only<1>
  {
    Querying data:

    \begin{displaymath}
      \{d \in \mathcal{D} \mid q(d, \mathcal{D})\}
    \end{displaymath}
    where:
    \begin{itemize}
    \item $\mathcal{D}$ is a dataset (tuples),
    \item $q$ is a query.
    \end{itemize}
  }\only<2->
  {
    Querying \only<2>{patterns}\only<3->{\alert{the frequent
        itemsets}}:

    \begin{displaymath}
      \{X \in P \mid \mathcal{Q}(X, \mathcal{D})\}
    \end{displaymath}
    where:
    \begin{itemize}
    \item $\mathcal{D}$ is \only<-3>{the dataset}\only<4->{\alert<4>{a
          set of objects $\mathcal{O}$ described with Boolean
          attributes in $\mathcal{A}$}},
    \item $P$ is \only<-4>{the pattern
        space}\only<5->{\alert<5>{$2^{\mathcal{A}}$}},
    \item $\mathcal{Q}$ is \only<-5>{an inductive
        query}\only<6->{\alert<6>{$\only<6->{(X, \mathcal{D}) \mapsto}
          \only<6>{|\{o \in \mathcal{O} \mid \forall x \in X, d_{o,
              x}\}|}\only<7>{\alert{f(X, \mathcal{D})}} \geq \mu$}}.
    \end{itemize}
  }
\end{frame}

\begin{frame}
  \frametitle{Frequency frontier ($\mu = 3$)}
  \only<1>{\includegraphics[width=\linewidth]{img/lattice}}\only<2>{\includegraphics[width=\linewidth]{img/frontier}}
\end{frame}

\begin{frame}
  \frametitle{Minimal frequency constraint}
  The minimal frequency constraint:
  \begin{itemize}[<+->]
  \item filters every \emph{relevant} itemset, defined as a subset of
    attributes whose estimated probability of being all true is high
    enough;
  \item decreases \alert<5>{the (exponential) \emph{number} of output
      itemsets} (increasing the minimal frequency only removes
    itemsets);
  \item decreases the (exponential) \emph{run time}.
  \end{itemize}

  \vfill

  \uncover<4->
  {
    In practice, high minimal frequencies are to be tested first.
  }
\end{frame}

\section{Closed and maximal itemset mining}

\begin{frame}
  \frametitle{Redundancy of information}
  \begin{theorem}
    Every subset of a frequent itemset is a frequent itemset.
  \end{theorem}

  \vfill
  \pause

  To remove some redundant information, the frequent itemsets can be
  constrained to be:
  \begin{description}
  \item[maximal] the largest (w.r.t. $\subseteq$) frequent itemsets;
  \item[closed] the largest (w.r.t. $\subseteq$) frequent itemsets
    among those having a same support.
  \end{description}

  \vfill
  \pause

  Other condensed representations of the frequent itemsets exist: the
  free itemsets, the non-derivable itemsets, etc.
\end{frame}

\begin{frame}
  \frametitle{Maximality and closedness}
  \begin{definition}
    Given the set of frequent itemsets $\mathcal{F}$, the frequent
    itemset $X \in \mathcal{F}$ is \emph{maximal} if and only if
    $\forall Y \in \mathcal{F}, X \not \subset Y$.
  \end{definition}

  \vfill
  \pause

  \begin{definition}
    Given the set of frequent itemsets $\mathcal{F}$, the frequent
    itemset $X \in \mathcal{F}$ is \emph{closed} if and only if
    $\forall Y \in \mathcal{F}, (X \subset Y \Rightarrow f(X,
    \mathcal{D}) \neq f(Y, \mathcal{D}))$.
  \end{definition}
\end{frame}

\begin{frame}
  \frametitle{Support equivalence classes}
  \includegraphics[width=\linewidth]{img/equivalence}
\end{frame}

\begin{frame}
  \frametitle{Inclusions}
  Given $\mathcal{D}$, a set of objects described with Boolean
  attributes in $\mathcal{A}$, and a minimal frequency $\mu \in
  \mathbb{N}$, let:
  \begin{itemize}
  \item $\mathcal{F} = \{X \subseteq \mathcal{A} \mid f(X,
    \mathcal{D}) \geq \mu\}$;
  \item $\mathcal{C} = \{X \in \mathcal{F} \mid \forall Y \in
    \mathcal{F}, (X \subset Y \Rightarrow f(X, \mathcal{D}) \neq f(Y,
    \mathcal{D}))\}$;
  \item $\mathcal{M} = \{X \in \mathcal{F} \mid \forall Y \in
    \mathcal{F}, X \not \subset Y\}$.
  \end{itemize}
  \pause
  \begin{theorem}
    $\mathcal{M} \subseteq \mathcal{C} \subseteq \mathcal{F} \enspace
    .$
  \end{theorem}
\end{frame}

\begin{frame}
  \frametitle{Frequent itemset mining: illustration}
  Let $2$ the minimal absolute frequency or, equivalently, 50\% the
  minimal relative frequency.

  \vfill

  \begin{columns}
    \begin{column}{.33\linewidth}
      \begin{displaymath}
        \begin{array}{c|ccc}
          & a_1 & a_2 & a_3\\
          \hline
          o_1 & \times & \times & \times\\
          o_2 & \times & \times & \\
          o_3 & & \times & \\
          o_4 & & & \times
        \end{array}
      \end{displaymath}
    \end{column}
    \begin{column}{.66\linewidth}
      \begin{itemize}[<+->]
      \item The frequent itemsets are
        \only<2->{\textcolor{red}}{$\emptyset$ (4)}, $\{a_1\}$ (2),
        \only<2->{\textcolor{red}}{$\{a_2\}$ (3)},
        \only<1>{$\{a_3\}$ (2)}\only<2>{\textcolor{red}{$\{a_3\}$
            (2)}}\only<3>{\textcolor{blue}{$\{a_3\}$ (2)}} and
        \only<1>{$\{a_1, a_2\}$ (2)}\only<2>{\textcolor{red}{$\{a_1,
            a_2\}$ (2)}}\only<3>{\textcolor{blue}{$\{a_1, a_2\}$
            (2)}};
      \item<2-> Among those frequent itemsets, the closed ones are in
        \textcolor{red}{red}.
      \item<3> Among the closed itemsets, the maximal ones are in
        \textcolor{blue}{blue}.
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Maximality: a condensed representation}
  Given $\mathcal{D}$, a set of objects described with Boolean
  attributes in $\mathcal{A}$, and a minimal frequency $\mu \in
  \mathbb{N}$, let:
  \begin{itemize}
  \item $\mathcal{F} = \{X \subseteq \mathcal{A} \mid f(X,
    \mathcal{D}) \geq \mu\}$;
  \item $\mathcal{M} = \{X \in \mathcal{F} \mid \forall Y \in
    \mathcal{F}, X \not \subset Y\}$.
  \end{itemize}

  \vfill
  \pause

  \begin{block}{$\mathcal{M}$ is a \emph{condensed representation} of
      $\mathcal{F}$}
    \begin{itemize}[<+->]
    \item $\mathcal{M} \subseteq \mathcal{F}$;
    \item \only<3>{$\mathcal{F}$ can be expressed as a function of
        $\mathcal{M}$ only}\only<4>{$\mathcal{F} = \cup_{X \in
          \mathcal{M}}2^X$}.
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Maximal itemsets and frequencies}
  \begin{theorem}
    Given a minimal frequency $\mu \in \mathbb{N}$, the related set
    of maximal itemsets $\mathcal{M} \subseteq 2^{\mathcal{A}}$ in a
    dataset $\mathcal{D}$, their frequencies, and $X \subseteq
    \mathcal{A}$:
    \vspace{-3ex}
    \begin{itemize}
    \item $f(X, \mathcal{D}) < \mu$ if $\forall M \in \mathcal{M}$, $X
      \not \subseteq M$;
    \item $f(X, \mathcal{D}) \alert<2>{\geq} \displaystyle\max_{\{M \in \mathcal{M}
        \mid X \subseteq M\}} f(M, \mathcal{D})$ otherwise.
    \end{itemize}
  \end{theorem}

  \vfill
  \pause

  The maximal itemsets and their frequencies carry little information
  about the frequencies of the other frequent itemsets: only
  lower bounds, usually close to the minimal frequency.
\end{frame}

\begin{frame}
  \frametitle{Retrieving a lower bound of a frequency}
  Let $2$ the minimal absolute frequency or, equivalently, 50\% the
  minimal relative frequency.

  \vfill

  \begin{columns}
    \begin{column}{.33\linewidth}
      \begin{displaymath}
        \begin{array}{c|ccc}
          & a_1 & a_2 & a_3\\
          \hline
          o_1 & \times & \times & \times\\
          o_2 & \times & \times & \\
          o_3 & & \times & \\
          o_4 & & & \times
        \end{array}
      \end{displaymath}
    \end{column}
    \begin{column}{.66\linewidth}
      The maximal itemsets are $\{a_3\}$ (2) and $\{a_1, a_2\}$
      (2).\uncover<2->{ From that information, it can only be proved
        that $f(\{a_2\}, \mathcal{D}) \geq 2$.}
    \end{column}
  \end{columns}

  \vfill

  \uncover<3>{Some frequent itemset may have a much higher frequency
    than that of the most frequent maximal itemset including it.}
\end{frame}

% \begin{frame}
%   \frametitle{The frequency frontier ($\mu = 3$)}
%   \includegraphics[width=\linewidth]{img/frontier}
% \end{frame}

\begin{frame}
  \frametitle{Closedness: a condensed representation}
  Given $\mathcal{D}$, a set of objects described with Boolean
  attributes in $\mathcal{A}$, and a minimal frequency $\mu \in
  \mathbb{N}$, let:
  \begin{itemize}
  \item $\mathcal{F} = \{X \subseteq \mathcal{A} \mid f(X,
    \mathcal{D}) \geq \mu\}$;
  \item $\mathcal{C} = \{X \in \mathcal{F} \mid \forall Y \in
    \mathcal{F}, (X \subset Y \Rightarrow f(X, \mathcal{D}) \neq f(Y,
    \mathcal{D}))\}$.
  \end{itemize}

  \vfill
  \pause

  \begin{block}{$\mathcal{C}$ is a \emph{condensed representation} of
      $\mathcal{F}$}
    \begin{itemize}[<+->]
    \item $\mathcal{C} \subseteq \mathcal{F}$;
    \item \only<3>{$\mathcal{F}$ can be expressed as a function of
        $\mathcal{C}$ only}\only<4>{$\mathcal{F} = \cup_{X \in
          \mathcal{C}}2^X$}.
    \end{itemize}
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Closed itemsets and frequencies}
  \begin{theorem}
    Given a minimal frequency $\mu \in \mathbb{N}$, the related set
    of closed itemsets $\mathcal{C} \subseteq 2^{\mathcal{A}}$ in a
      dataset $\mathcal{D}$, their frequencies, and $X \subseteq
      \mathcal{A}$:
    \begin{itemize}
    \item $f(X, \mathcal{D}) < \mu$ if $\forall C \in \mathcal{C}$, $X
      \not \subseteq C$;
    \item $f(X, \mathcal{D}) \alert<2>{=} \displaystyle\max_{\{C \in
        \mathcal{C} \mid X \subseteq C\}} f(C, \mathcal{D})$
      otherwise.
    \end{itemize}
  \end{theorem}

  \vfill
  \pause

  The closed itemsets and their frequencies carry all the information
  about the frequencies of the other frequent itemsets.
\end{frame}

\begin{frame}
  \frametitle{Retrieving the frequency}
  Let $2$ the minimal absolute frequency or, equivalently, 50\% the
  minimal relative frequency.

  \vfill

  \begin{columns}
    \begin{column}{.33\linewidth}
      \begin{displaymath}
        \begin{array}{c|ccc}
          & a_1 & a_2 & a_3\\
          \hline
          o_1 & \times & \times & \times\\
          o_2 & \times & \times & \\
          o_3 & & \times & \\
          o_4 & & & \times
        \end{array}
      \end{displaymath}
    \end{column}
    \begin{column}{.66\linewidth}
      The closed itemsets are $\emptyset$ (4), $\{a_2\}$ (3),
      $\{a_3\}$ (2) and $\{a_1, a_2\}$ (2).\uncover<2->{ From that
        information, it can be proved that $f(\{a_1\}, \mathcal{D}) =
        2$.}
    \end{column}
  \end{columns}

  \vfill

  \uncover<3>{The frequency of a frequent itemset is a valuable piece
    of information to assess its quality.}
\end{frame}

\begin{frame}
  \frametitle{Frequent vs. maximal vs. closed}
  \begin{block}{Maximality vs. closedness}
    \begin{itemize}
    \item Maximality condenses the frequent itemsets a lot but the
      information about their frequencies is lost;
    \item Closedness condenses the frequent itemsets a little but the
      information about their frequencies is kept.
    \end{itemize}
  \end{block}

  \vfill
  \pause

  Every unclosed itemset is less informative than the closed itemset
  with the same support.

  \vfill
  \pause

  \begin{alertblock}{Conclusion}
    If the itemsets are to be directly interpreted, only list closed
    itemsets: unclosed itemsets do not bring any additional
    information.
  \end{alertblock}
\end{frame}

\begin{frame}
  \frametitle{Summary}
  \begin{itemize}[<+->]
  \item Frequent itemsets are subsets of Boolean attributes that
    are all ``true'' for enough objects;
  \item In the worst case, the number of frequent itemsets is
    exponential in the number of attributes, and so is the time to
    list them;
  \item The maximal itemset are the largest frequent itemsets;
  \item Maximality condenses the frequent itemsets a lot but the
    information about their frequencies is lost;
  \item The closed itemsets are the largest frequent itemsets among
    those having a same support;
  \item Closedness condenses the frequent itemsets a little but the
    information about their frequencies is kept.
  \end{itemize}
\end{frame}

\section{Assessing itemsets}

\begin{frame}
  \frametitle{Assessing with/without supervision}
  Itemset mining aims to discover \emph{correlations} between any
  number of Boolean attributes: it is \emph{unsupervised}.  As a
  consequence, there are only \emph{intrinsic} measures of the quality
  of an itemset or of a collection of itemsets.

  \vfill
  \pause

  Nevertheless, itemsets can be mined in a supervised context too. For
  example, given classified objects, how much an itemset discriminates
  a particular class can be a quality measure. There are tens of ways
  to define the discriminating power of an itemset.
\end{frame}

\begin{frame}
  \frametitle{Lift}
  The \emph{lift} quantifies how expected (lift close to $1$) or
  unexpected (lift significantly different from $1$) the frequency of
  an itemset given the frequencies of its individual attributes. It is
  the ratio between the relative frequency of the itemset and its
  expected relative frequency under the assumption that its attributes
  are independent.

  \vfill
  \pause

  \begin{definition}
    Given $\mathcal{D}$, a set of objects $\mathcal{O}$ described with
    Boolean attributes in $\mathcal{A}$, the \emph{lift} of an itemset
    $X \subseteq \mathcal{A}$ is
    $\frac{|\mathcal{O}|^{|X| - 1}f(X, \mathcal{D})}{\prod_{a \in
        X}{f(\{a\}, \mathcal{D})}}$.
  \end{definition}

  \vfill
  \pause

  \emph{Frequent} itemset mining can only discover itemsets with high
  lifts indicating \emph{positively}-correlated attributes.
\end{frame}

% \begin{frame}
%   \frametitle{Correlation}
%   An itemset with a high \emph{lift} reveals a positive correlation
%   between \emph{all} its Boolean attributes.

%   \vfill

%   \begin{center}
%     \includegraphics[width=.66\linewidth]{img/regression}
%   \end{center}
% \end{frame}

\begin{frame}
  \frametitle{Statistical measures}
  \begin{description}[<+->]
  \item[Swap randomization] randomizes the dataset $\mathcal{D}$ while
    preserving the numbers of true values per object and per
    attribute.  The itemsets in $\mathcal{D}$ that are significantly
    less frequent in the randomized dataset are interesting.
  \item[Compression ratio] is how informative an itemset $X$ (what
    increases with $|X|f(X, \mathcal{D})$ and with how infrequent the
    involved objects/attributes) divided by its description length
    (what increases with $|X| + f(X, \mathcal{D})$).
  \end{description}
\end{frame}

\section{Beyond frequent itemsets}

\begin{frame}
  \frametitle{Constraining the itemsets}
  To filter the most \emph{relevant} itemsets and, maybe, turn their
  extraction \emph{faster}, some algorithms allow to specify
  additional constraints the output itemsets must satisfy.

  \vfill
  \pause

  \begin{exampleblock}{High-utility itemset mining}
    Given $\mathcal{D}$, a set of objects $\mathcal{O}$ described with
    Boolean attributes in $\mathcal{A}$, a utility function
    $u: \mathcal{O} \times \mathcal{A} \rightarrow \mathbb{R}$, and
    $\sigma \in \mathbb{R}$, listing every itemset
    $X \subseteq \mathcal{A}$ such that
    $\sum_{t \in \{o \in \mathcal{O} \mid \forall x \in X\text{,
      }d_{o, x}\} \times X} u(t) \geq \sigma$.
  \end{exampleblock}

  \vfill
  \pause

  Getting closer to querying inductive databases.
\end{frame}

\begin{frame}
  \frametitle{Mining cliques}
  \begin{columns}
    \begin{column}{.5\linewidth}
      \begin{center}
        \only<1>{\includegraphics{img/graph3}}\only<2->{\includegraphics{img/graph3_clique}}
      \end{center}
    \end{column}
    \begin{column}{.5\linewidth}
      \begin{displaymath}
        \begin{array}{c|cccc}
          & a & b & c & d\\
          \hline
          a & \alert<2->{\times} & & \alert<2->{\times} &
          \alert<2->{\times}\\
          b & & \times & & \times\\
          c & \alert<2->{\times} & & \alert<2->{\times} &
          \alert<2->{\times}\\
          d & \alert<2->{\times} & \times & \alert<2->{\times} &
          \alert<2->{\times}
        \end{array}
      \end{displaymath}
    \end{column}
  \end{columns}

  \vfill

  \uncover<3>
  {
    A (maximal) clique is a constrained (closed) itemset: its support
    must be equal to the itemset.
  }
\end{frame}

\begin{frame}
  \frametitle{Collections of more complex objects}
  Frequent (closed/maximal) patterns are easily defined in collections
  of words, sequences of itemsets or (labeled) graphs.

  \vfill
  \pause

  Itemsets are easily generalized to $n$-ary (rather than binary)
  relations too.

  \vfill
  \pause

  Generalizing the algorithms (not the patterns) is not as easy.
\end{frame}

\begin{frame}
  \frametitle{Patterns in one single large object}
  Frequent patterns can be defined as repetitions in a large word, a
  large sequence of itemsets or a large (labeled) graph.

  \vfill
  \pause

  \begin{alertblock}{How many sub-sequences?}
    In the sequence $\langle a, a, a, a \rangle$, how many
    sub-sequences $\langle a \rangle$ are there?  \uncover<3->{What
      about the sub-sequence $\langle a, a \rangle$?}
  \end{alertblock}

  \vfill

  \uncover<4>{Different definitions of the frequency have been
    proposed. For some of them, sub-patterns of frequent patterns can
    be infrequent and searching for closed/maximal patterns makes
    little sense.}
\end{frame}

\begin{frame}
  \frametitle{Noise tolerance}
  True values that are erroneously false in the dataset fragment the
  ``real'' itemsets and their supports.

  \vfill
  \pause

  Given $\mathcal{D}$, a set of objects $\mathcal{O}$ described with
  Boolean attributes in $\mathcal{A}$, a noise-tolerant pattern
  $X_1 \times X_2 \in 2^{\mathcal{O}} \times 2^{\mathcal{A}}$ accepts
  \alert<3>{a few} pairs $(o, a)$ such that $d_{o, a} = 0$, where
  $0 =$ false and $1 =$ true.

  \vfill
  \pause

  To be sensible, noise tolerance should be per object and per
  attribute.  Thresholds $(\epsilon_1, \epsilon_2) \in \mathbb{N}^2$
  can be defined and $X_1 \times X_2$ constrained to satisfy
  $\begin{cases}
    \forall o \in X_1\text{, }\sum_{a \in X_2} (1 - d_{o, a}) \leq
    \epsilon_1\\
    \forall a \in X_2\text{, }\sum_{o \in X_1} (1 - d_{o, a}) \leq
    \epsilon_2
  \end{cases}$.

  % \vfill
  % \pause

  % The (noise-tolerant) itemsets can be heuristically grown or
  % agglomerated in a post-processing step.
\end{frame}

\begin{frame}
  \frametitle{Patterns in fuzzy datasets}
  Given $\mathcal{D}$, a set of objects described with attributes all
  taking values in $[0, 1]$, thresholds
  $(\epsilon_1, \epsilon_2) \in \mathbb{R}_+^2$ can be defined and
  $X_1 \times X_2$ constrained to satisfy
  $\begin{cases} \forall o \in X_1\text{, }\sum_{a \in X_2} (1 - d_{o,
      a}) \leq
    \epsilon_1\\
    \forall a \in X_2\text{, }\sum_{o \in X_1} (1 -d_{o, a}) \leq
    \epsilon_2
  \end{cases}$.

  \vfill
  \pause

  \begin{block}{\texttt{multidupehack}}
    \texttt{multidupehack} (on \url{http://dcc.ufmg.br/~lcerf}) lists
    such (closed) noise-tolerant patterns under arbitrary additional
    constraints (including clique and high-utility) in fuzzy tensors.
  \end{block}
\end{frame}

\begin{frame}
  \frametitle{Larger noise-tolerant patterns}
  Tolerating noise, complete algorithms actually list more patterns,
  with more overlap.  The run time exponentially increases with the
  noise tolerance.  Fixing the thresholds for the noise tolerance and
  for the additional constraints (\eg, a minimal frequency) is hard.

  \vfill
  \pause

  \emph{Heuristic} algorithms (\eg, sparse factorization techniques)
  list a few large noise-tolerant patterns that summarize the dataset.

  \vfill
  \pause

  \begin{exampleblock}{NclusterBox}
    NclusterBox (on \url{http://dcc.ufmg.br/~lcerf}) efficiently
    summarizes fuzzy tensors.
  \end{exampleblock}
\end{frame}

\section{Case study}

\section*{}

\begin{frame}
  \frametitle{License}
  \begin{block}{\copyright 2012--2025 Loïc Cerf}
    \includegraphics[height=1.5ex]{img/licenses/cc-by-sa}\hskip1pt
    These slides are licensed under the Creative Commons
    Attribution-ShareAlike 4.0 International License.
  \end{block}
\end{frame}

\end{document}