## 2 Materials and Methods
### Data  
Information on installation, operation, and replacement of heat meters has been accumulated over the last ten years in a relational database. The meter is a subject of a cyclical readout of its current value necessary to calculate the energy consumption in a defined billing period. Potential failure should be detected at the latest at the time of meter readout. The billing period usually lasts 12 months (but it can also last 6, 18, or 24 months) and starts at the beginning of the chosen month (often it is January, June, or September). Some modern smart meters also store the monthly values, although they do not impact the final billing. The discussed database also includes many other items of information used for the billing of utilities (approximately 150 relational tables; some of them consist of 20 million records; in total, 250 GB of data), as well as data regarding other types of meters (water meters and heat distributors). However, the authors decided to focus on the heat meters addressed in the introduction. The available data may offer clues to many questions concerning the operation of heat meters. For economic reasons, the most significant problem is detecting and predicting a failure; thus, the data were prepared for this purpose. After data preparation and initial statistical analysis, sixteen parameters were selected for further processing (Table 1). \begin{table}
\begin{tabular}{c c c} \hline
**Name** & **Description** & **Type** \\ \hline \multirow{3}{*}{Age} & Life of the meter in months & \\  & from the moment of installation & \(\mathbb{N}\) number \\  & to the last readout or failure & \\  & Postal code of flat/office, in which & \\   ZIP & the meter is installed & \(\mathbb{N}\) number \\   Floor & Floor where the meter is installed & \(\mathbb{N}\) number \\   FlatType & Type of usable area & String of letters \\   RoomType & Type of area & String of letters \\   AccConsumption & Consumption from the moment of registration & \(\mathbb{R}\) Number \\   CurrentConsumption & Consumption in the last settlement period & \(\mathbb{R}\) Number \\   CommType & Type of communication with the meter & String of letters \\   Producer & Name of the manufacturer of the meter & String of letters \\   RatingFactor & Equalization factor & \(\mathbb{R}\) number \\   BillingNo & Next number of the settlement period & \(\mathbb{N}\) number \\   CurrentValue & Last recorded value of the meter & \(\mathbb{R}\) number \\   AvgConsumption & Average consumption in all settlement periods & \(\mathbb{R}\) Number \\   MaxConsumption & Maximum consumption in the settlement period & \(\mathbb{R}\) Number \\   MinConsumption & Minimum consumption in the settlement period & \(\mathbb{R}\)Number \\   CalculatedAge & Calculated age of the meter in months: & \(\mathbb{R}\) number \\   CurrentValue/AvgConsumption & & \\ \hline \end{tabular}
\end{table} 
Table 1: Sixteen selected features. The type of the usable surface (e.g., flat, office, or storeroom), as well as the type of room (e.g., room, kitchen, bathroom, and corridor) were represented by enumerations. In case of an unclear situation, the value \"other\" was used. The authors decided to distinguish sixteen types of rooms and five types of usable surfaces. Since some models accept only numbers, each type of room was assigned a successive natural number. The same was done in the case of meters' manufacturers (16 different values). The rating factor is a real number from the interval (0-1). It is used in the case of rooms with an increased consumption of heat, e.g., due to adjacency to external walls of the building. This ensures a fair distribution of the heating costs of the whole building between all tenants, irrespective of the fact of whether they have an external flat or not. An important parameter is also the method of communication with the equipment (CommType).