## 4 Managing RSS Outliers and Selecting RSS Representatives  
After outliers have been identified in an observation, the next step is to treat them. How an outlier is treated depends on several factors, one of which is the size of the observation. There are several techniques to treat outliers, and the most commonly used are as follows [37; 38].  
Deletion: outliers can simply be removed from the observation. This approach is often used when the number of outliers is small, and the dataset is large enough that removing a few observations will not significantly impact the analysis.  
* Winsorization: involves replacing the extreme values (outliers) with values that are closer to the mean or median of the observation. This method can preserve the observation size and reduce the influence of outliers on the results, but it can also alter the distribution of the observation and introduce bias.
* Trimming: involves removing a fixed percentage of the outliers from the observation. This method is similar to deletion, but it can reduce the impact of outliers on the results while preserving a larger portion of the data. However, trimming can also introduce bias and alter the distribution of the data.
* Transformation: involves changing the scale of the observation to reduce the influence of outliers. Common transformations include logarithmic or reciprocal transformations, which can reduce the impact of outliers by transforming the observation into a more symmetrical distribution.
* Median or mean imputation: Outliers can be replaced with the median or mean of the dataset. This approach is useful when the outliers are affecting the analysis and removal is not an option.  
All the techniques mentioned above have their advantages and disadvantages; however, for a limited number of observations, the imputation method is considered to be simple and efficient [39]. In this paper, the median imputation technique will be used to treat outliers because the mean, as previously mentioned, is heavily influenced by outliers.  
Let \(\text{MED}_{RSS_{ij}}\) be the median of the RSS observations in Equation (1), the process for the detection and treatment of outliers is as follows: Given an RSS observation, \(rss(n)\), if:  
\[||z_{score}(rss(n))||>|\gamma|\text{ for }z_{score}\in[Z_{s_{n}}(n),Z_{MAD}(n)] \quad\text{ and }1\leq n\leq N \tag{11}\]  
then  
\[rss(n)=rss(n)\quad\text{ for }\quad 1\leq n\leq N \tag{12}\]  
else  
\[rss(n)=\text{MED}_{rss_{ij}}\quad\text{ for }\quad 1\leq n\leq N \tag{13}\]  
The next step after detecting and treating the RSS outlier is the determination of the RSS observation representative. The median approach is considered to be the optimum approach to determine RSS representative of a time-series RSS observation. Let the RSS observation vector in Equation (14) be the cleaned RSS observations without the outliers.  
\[\textbf{rss}_{i,j}^{clean}=[rss_{clean}(1),rss_{clean}(2),\cdots,rss_{clean}(N)] \tag{14}\]  
where \(rss_{clean}(n)\) is a non-outlier RSS observation.  
Using the median approach, the median RSS that represents the observation in Equation (14) is obtained as follows:  
\[rss_{median}=median\Big{\{}\textbf{rss}_{i,j}^{clean}\Big{\}} \tag{15}\]  
The performance of the RSS outlier detection techniques presented in Section 2 is compared in the following section.