2.13 ENFERMEDADES PRODUCIDAS POR UNA MALA NUTRICIÓN EN
2.13.3 Productos tradicionales de la Parroquia de Pifo
Figure 6.11: Spatial covariate shift at regional level. For each division, we compute the median location of the respective customers and assign M CCmax to it. We
then use nearest interpolation to generate the local covariate shift maps.
Figure 6.12: Spatial covariate shift at municipal level.
6.4 Reducing Multiple Biases
We propose the following methodology employing instance weighting that is defined in Equation 6.3.
6 Biases in Inspection Data
Figure 6.13: Spatial covariate shift at local level.
Figure 6.14: Spatial covariate shift at neighborhood level.
6.4.1 Methodology
Given the assumptions made for class imbalance in Equations 6.4 and 6.5, we compute the corresponding weight for exampleihaving a label of classk as follows:
wi,k = Ptest(x(i), y(ki)) Ptrain(x(i), yk(i)) = Ptest(x (i)|y(i) k )Ptest(y (i) k ) Ptrain(x(i)|yk(i))Ptrain(yk(i)) = Ptest(y (i) k ) Ptrain(y(ki)) . (6.11)
We use the empirical counts of classes for computingP<dist>(yk).
6.4 Reducing Multiple Biases
corresponding weight for the bias in featurekof exampleias follows: wi,k = Ptest(x(ki), y(i)) Ptrain(x(ki), y(i)) = Ptest(y (i)|x(i) k )Ptest(x (i) k ) Ptrain(y(i)|xk(i))Ptrain(x(ki)) = Ptest(x (i) k ) Ptrain(x(ki)) . (6.12)
We use density estimation for computingP<dist>(x(ki)) [131].
There may be a variety of biases in a learning problem that are far more than just class imbalance and covariate shift on a single dimension. We have shown previously that there may be multiple types of covariate shift, for example spatial covariate shifts on different hierarchical levels. As we have shown in Chapter 6.3, there may be also covariate shifts for other master data, such as for the customer class or for the contract status.
We now aim to correct n different biases at a same time, e.g. for class imbalance as
well as different types of covariate shift. As x(i) has potentially many dimensions with a
considerable covariate shift, computing the jointP<dist>(x(i)) becomes impractical for an
increasing number of dimensions. We propose a uniformed and scalable solution to combine weights for correcting thendifferent biases, comprising for example of class imbalance and
different types of covariate shift. The corresponding weights per bias of an example are
wi,1, wi,2, ..., wi,n. The example weightwi is the harmonic mean of the weights of the biases
considered is computed as follows:
wi = n 1 wi,1 + 1 wi,2 +· · ·+ 1 wi,n = Pn n k=1 1 wi,k . (6.13)
As the different wi,k are computed from noisy, real-world data, special care needs to
be paid to outliers. Outliers can potentially lead to very large valueswi,k for the density
estimation proposed above. It is for that reason that we choose the harmonic mean, as it allows to penalizes extreme values and give preference to smaller values.
6.4.2 Evaluation
We use the same data as in Chapter 5.2. We retain M = 150,700customers. For these
customers, we have a complete time series of 24 monthly meter readings before the most recent inspection. From each time series, we compute 304 features comprising generic time series features, daily average features and difference features, as detailed in Table 5.7. We employ hypothesis tests to the features in order to retain the ones that are statistically relevant. These tests are based on the assumption that a featurexk is meaningful for the
prediction of the binary label vectory if xk and y are not statistically independent [139].
For binary features, we use Fisher’s exact test [54]. In contrast, for continuous features, we use the Kolmogorov-Smirnov test [107]. We retain 237 of the 304 features.
We previously found a random forest (RF) classifier to perform the best on this data compared to decision tree, gradient-boosted tree and support vector machine classifiers.
6 Biases in Inspection Data
It is for this reason that in the following experiments, we only train RF classifiers. When training a RF, we perform model selection by doing randomized grid search, for which the parameters are detailed in Table 6.5. We use 100 sampled models and perform 10-fold cross-validation for each model.
Table 6.5: Model parameters for random forest.
Parameter Values
Max. number of leaves [2,1000)
Max. number of levels [1,50)
Measure of the purity of a split {entropy, gini}
Min. number of samples required to be at a leaf [1,1000)
Min. number of samples required to split a node [2,50)
Number of estimators 20
6.4.3 Discussion
We have previously shown in Chapter 6.3 that the location and class of customers have the strongest covariate shift. When reducing these, we first compute the weights for the class imbalance, the spatial covariate shift and customer class covariate shift, respectively, as defined in Chapter 6.2. For covariate shift, we use randomized grid search for a model selection of the density estimator that is composed of the kernel type and kernel bandwidth. The complete list of parameters and considered values is depicted in Table 6.6.
Table 6.6: Density estimation parameters.
Parameter Values
Kernel {gaussian, tophat, epanechnikov, exponential, linear, cosine}
Bandwidth [0.001,10](log space)
Next, we use Equation 6.13 to combine these weights step by step. For each step, we report the test performance of the NTL classifier in Table 6.7. It clearly shows that the larger the number of addressed biases, the higher the reliability of the learned predictor.
6.5 Conclusions
Table 6.7: Test performance of random forest. AU C denotes the mean test AUC of the 10
folds of cross-validation for the best model.
Biases Reduced AU C
None 0.59535
Class imbalance 0.64445
Class imbalance + spatial covariate shift 0.71431 Class imbalance + spatial covariate shift
0.73980 + customer class covariate shift
6.5 Conclusions
In this chapter, we first have presented a number of historic and modern examples of biased data sets that resulted in unreliable models. Biases occur in machine learning whenever training sets are not representative of the test data. Even though biases have been recognized as an issue in statistics since the mid-20th century, they only recently started to get more attention in machine learning, yet the situation is evolving. We then provided an extensive review of biases in machine learning, with a (special) focus on the most common ones: class imbalance and covariate shift. As a consequence, in many cases it may not be helpful to simply have more data, but rather to have (possibly less) data that is more representative.
We have then proposed a novel framework for quantifying and visualizing covariate shift in data sets, with a particular focus on spatial data sets. In the context of non-technical loss (NTL) detection, we showed that there is a covariate shift between the inspected customers and the overall population of customers. We showed that some features have a stronger covariate shift than others. In particular, the spatial covariate shift is the strongest and appears in different hierarchical levels. Subsequently, machine learning models trained on this data will lead to unreliable NTL predictions. Last, we proposed a scalable model for reducing multiple biases in high-dimensional data at the same time. We applied our methodology to NTL detection. Our model leads to more reliable predictors, thus allowing to better detect customers that have an irregular power usage.
7
Conclusions and Prospects
In emerging markets, non-technical losses (NTL) constitute the dominant part of losses in power grids. Concretely, they may range up to 40% of the total electricity distributed in countries such as Brazil, India or Pakistan. The economic effects thereof for utilities are enormous as the world-wide total financial losses are about USD 100 billion per year.
The main research question of this thesis is:
How can we detect non-technical losses better in the real world?
In this research and implementation of machine learning for NTL detection using real- world data, we have shown that our solution has a large part to play in the future of NTL detection. Our models have the potential to generate significant economic value in real- world applications, as they are being deployed in a commercial NTL detection software. To conclude this thesis, we will review what we consider are the main contributions made and discuss plans for future related work.
7 Conclusions and Prospects
7.1 Contributions
The main achievements of this thesis can be outlined as follows: 1. Review of Causes and Economic Impact of NTL
In Chapter 1, we have provided an in-depth discussion of the causes of NTL. Our review has shown that NTL are a prime concern and often range up to 40% of the total electricity distributed. The annual world-wide costs for utilities due to NTL are estimated to be around USD 100 billion. Reducing NTL in order to increase revenue, profit and reliability of the grid is therefore a vital interest to utilities and authorities.
2. Identification of the Open Challenges of NTL Detection
In Chapter 3, we first surveyed the state-of-the-art research efforts in a up-to-date and comprehensive review of algorithms, features and data sets used. We also compared the various approaches reported in the literature. Next, we identified the key scientific and en- gineering challenges of NTL detection that have not yet been addressed in scientific works. We put these challenges in the context of AI research as a whole as they are of relevance to many other real-world learning and anomaly detection problems.
3. Comparing Industrial NTL Detection Systems based on Expert Knowledge to those based on Machine Learning
In Chapter 4, we used an industrial NTL detection system based on Boolean logic. We improved it by fuzzifying the rules and compared both to a NTL detection system based on machine learning. We showed that the one based on machine learning significantly outperforms the others based on expert knowledge.
4. Combining Industrial Expert Knowledge with Machine Learning for the Decision Making
Despite the superiority of machine learning-based approaches over expert knowledge for NTL detection, electric utilities are reluctant to move to large-scale deployments of auto- mated systems that learn NTL profiles from data due to the latter’s propensity to suggest a large number of unnecessary inspections. In order to allow human experts to feed their knowledge in the decision process, we proposed in Chapter 4 a method for visualizing pre- diction results of a machine learning-based system at various granularity levels in a spatial hologram. Our approach allows domain experts to put the classification results into the context of the data and to incorporate their knowledge for making the final decisions of which customers to inspect.