# A GIS-Based Hot and Cold Spots Detection Method by Extracting Emotions from Social Streams
## 1 Introduction
The GIS-based framework in [10] responds to this need by classifying these sub-zones on the basis of the perception and moods of citizens detected in posts inserted in social networks. In many problems, the user is not interested in detecting the exact shape of hot/cold spots on the map but intends to evaluate if a sub-zone of the study area can be classified as a hot or cold spot, that is, if the phenomenon is particularly present or rare on the subzone for a defined period of time. This goal was pursued in [35], which investigates whether urban agglomerations the City of London is divided into are more common and which sorts of catastrophic catastrophes endure over time. The idea on which this research is based consists of constructing a GIS-based framework for detecting hot and cold spots based on the information extracted from social streams, with the aim of determining which subzones of the study area are classified as hot/cold spots. Unlike the method proposed in [35], we do not use fuzzy-clustering-based hot spot detection methods, but we apply an emotion-based classification model to classify subzones of the study area based on the relevance of pleasant and unpleasant emotions of citizens determined by starting from social data. This approach allows for taking into account the hidden knowledge extracted from social streams that allow the evaluation of the persistence of the phenomenon in a sub-zone based on the moods of citizens. Following [6; 11; 12], we partition the emotions into pleasant and unpleasant, identifying as hot/cold spots a sub-zone classified as unpleasant/pleasant for a duration greater than a predetermined period. We call our framework FESC (Fuzzy Emotion-based hot and cold Spots Classification). The study area is partitioned into subzones, and the user defines the atomic time interval, called time frame, to be considered for the analysis of the evolution of the intensity of a phenomenon. A dictionary of emotion categories is created, divided into pleasant and unpleasant. The social data are extracted and grouped for subzone and time frame; after a text parting phase, they constitute the documents of a corpus. The dictionary of emotion categories is structured as in [6], in which each emotion category is assigned a set of terms. The Term Frequency measures the relevance of a term in a document--The Term Frequency--Inverse Document Frequency index (TF-IDF) [37], a well-known metric measuring the importance/relevance of a word in a text, is used to determine the relevance of a term in a document. Following [6,11,12], the TF-IDF values measured for all terms assigned to an emotion category are summed and normalized to form the relevance of this emotion category in the document; then, the TDF-IDF values assigned to pleasant (unpleasant) categories are summed, obtaining a normalized index called pleasant (unpleasant) emotion relevance (for short Pleasant/Unpleasant ER) representing the relevance of pleasant (unpleasant) emotions in the document, where the sum of Pleasant and Unpleasant ER measures in a document is equal to 1. To evaluate the intensity of the Pleasant/Unpleasant ER in a document, we define a fuzzy partition, built by starting from the emotional Pleasant/Unpleasant ER measure, described by fuzzy linguistic labels. Each document is classified according to the intensity of the relevance of both pleasant and unpleasant emotions. The linguistic label value of the fuzzy set of the ER fuzzy partition, to which it has the highest membership degree, is used to classify it. For instance, consider the Low, Medium-low, Medium, Medium-high, and High fuzzy sets as the Pleasant/Unpleasant ER fuzzy partition in Figure 1. Let the pleasant ER measure of a document be equal to 0.59 and the unpleasant ER measure is given by \(1-0.59=0.41\). Then, the document will be classified into the pleasant class Medium-high and the unpleasant class Medium.