# Characterizing Situations of Dock Overload in Bicycle Sharing Stations
## 3 Methodology
### Mining Occupancy Monitoring Patterns
#### 3.2.2 Proposed Approach for OMP Mining  
The problem of generating OMPs has been addressed as an itemset mining problem. Itemset mining is an exploratory data mining technique which consists of discovering interesting and useful patterns in transactional databases [28]. More specifically, it entails discovering the groups of attribute values that frequently co-occur in the analyzed database. Itemset mining has been applied in various application domains such as market basket analysis, bio-informatics, text mining, product recommendation, and Web clickstream analysis. To enable the itemset mining process in our target context, the records contained in \(\mathcal{D}\) are tailored to a transactional data format. To this purpose, we first introduce the concept of occupancy item (o-item, in short); next, each record \(R_{i}\in\mathcal{D}\) is represented in a transactional data format as a set of o-items. An o-item represents a dock occupancy measurement acquired within a given time period and associated with a given station. More formally, an o-item is modeled as a triple \(\langle s_{j},o_{i}^{j},TP_{j}\rangle\), where is an arbitrary station, \(o_{i}^{j}\) is the occupancy level of station \(s_{j}\) at any timestamp \(t_{i}\in\mathit{TP}_{i}\), and \(\mathit{TP}_{i}\) is a time period. Note that the exact timestamp at which the measurement was acquired is not explicitly reported in the o-item because the goal is to identify the stations that have acquired critical dock occupancy levels within each time period. In the transactional dataset \(\mathcal{T}\), each transaction is logically identified by a Transaction IDentifier (TID). Each record contained in \(\mathcal{D}\) is represented as a transaction in \(\mathcal{T}\) characterized by the same identification value (i.e., a record with RID equal to \(\mathrm{RID}_{x}\) is mapped to a transaction with TID equal to \(\mathrm{TID}_{x}\)). **Example 2**. : _Table 2 reports the transactional representation of dataset \(\mathcal{D}\) on Table 1. Records \(\mathrm{RID}_{1}\)-\(\mathrm{RID}_{7}\) are mapped to transactions \(\mathrm{TID}_{1}\)-\(\mathrm{TID}_{7}\)._  
An occupancy itemset (o-itemset, in short) is a set of o-items (of arbitrary size) such that all the contained o-items correspond to the same time period. The frequency of an o-itemset is the number of transactions including it. **Example 3**. : _\(\{\langle s_{1},\mathit{Overloaded},\mathit{TP}_{1}\rangle,\,\langle s_{3}, \mathit{Overloaded},\mathit{TP}_{1}\rangle\}\) is an o-itemset with frequency equal to 2 in the transactional dataset in Table 2 because it occurs in transactions with TID equal to \(\mathrm{TID}_{1}\) and \(\mathrm{TID}_{2}\). This o-itemset indicates that stations \(s_{1}\) and \(s_{3}\) were temporarily overloaded in two different measurements acquired in period \(\mathit{TP}_{1}\)._  
OMPs and their criticality and intermittence values can be derived from the mined o-itemsets. Therefore, our proposed methodology for OMP mining is based on the following two steps. First, o-itemsets are mined. Then, OMPs are generated on top of the mined o-itemsets and their criticality and intermittence values are computed. In the following, the two steps are separately described. _Step 1: O-itemset mining._ A set of o-itemsets is extracted from the transactional representation of the occupancy level dataset. Each of the mined o-itemsets satisfies the following conditions. (i) All the contained o-items have the same occupancy level (i.e., all normal or all overloaded); and (ii) All the stations contained in the o-itemset satisfy the spatial constraint _maxdist_. Thus, for every pair of stations appearing in the o-itemset, their geographical distance is below _maxdist_. Condition (i) allows us to extract two different types of o-itemsets: the critical o-itemsets, which include only the o-items with occupancy level overloaded, and the normal o-itemsets, which include only the o-items with occupancy level normal.