Makine öğrenmesi teknikleri ile tahsilat davranışı tahmini: telekomünikasyon sektörü örneği
Prediction of debt collection behaviour with machine learning techniques: A case study on telecommunication company customers
Yazar: ELİF EKİZ
Danışman: DOÇ. DR. BAŞAR ÖZTAYŞİ
İstanbul Teknik Üniversitesi / Fen Bilimleri Enstitüsü / Endüstri Mühendisliği Ana Bilim Dalı / Endüstri Mühendisliği Bilim Dalı
Derece: Yüksek Lisans, 2019
Konu: Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol = Computer Engineering and Computer Science and Control ; Endüstri ve Endüstri Mühendisliği = Industrial and Industrial Engineering

Özet:
Şirketlerin varlıklarını sürdürebilmeleri için, müşterilerine sağladıkları hizmetlerin karşılıklarını almaları gerekmektedir. Böylece kendi finansmanlarını sağlayıp, gelişmeye devam edebilirler. Ancak zamanında ödenmeyen faturalar şirketlere ciddi bir yük getirmektedir. Şirketler gelişmeye devam etmek ve yeni ürünler ortaya koymak yerine, bu alacakları tahsil etmeye çalışarak kendi bünyelerinde performans kaybı yaşamaktadırlar, gelişmeye ve büyümeye devam edememektedirler. Bu performans kaybını önlemek için bazı şirketler borçlu müşterilerinden, alacaklarının tahsilatını dış kaynaklarla yürütmektedirler. 
Bu çalışma kapsamında da, Türkiye'deki bir telekomünikasyon şirketinin borçlu müşterilerinden alacağını tahsil edebilmesi için izlediği yolun optimize edilmesine çalışılmıştır. Bu kapsamda, şirket borçlu müşterilerini arayarak ilk olarak borcu kendisi tahsil etmeye çalışmaktadır. Ulaşamadığı veya tahsilat gerçekleştiremediği müşterilerini avukatlık bürolarına yönlendirmektedir. Daha sonrasında bu avukatlık büroları, tahsil edebildikleri tutar üzerinden bir performans sistemine dahil edilmektedirler. Bu performans sisteminden çıkan sonuç, büronun bir sonraki ay telekomünikasyon şirketinden devir alacağı müşteri sayısında etkili olmaktadır. Bu kapsamda, şirket, daha doğru değerlendirme yapabilmek için, bu bürolara atanmış olan dosyaların homojen zorlukta olmasını istemektedir. Eşit zorlukta yapılan atamalar sayesinde bürolar adil ve şeffaf bir şekilde değerlendirilebileceklerdir. Böylece hem bürolar için daha şeffaf bir yapı kurulmuş olacak hem de şirket doğru atamalar yaparak elde edeceği tahsilat tutarını artırmış olacaktır.
Yapılan tez çalışmasında, müşteri örnekleri incelenerek müşterinin borcunu ödeme potansiyeli öngörülecek sonrasında her müşteri için borcunu geri ödeme ihtimali hesaplanacaktır. Sonrasında ise bu ihtimal değerleri kullanılarak büro bazında homojen zorlukta müşteri ataması yapılması planlanmıştır.
Bu çalışma kapsamında sınıflandırma yapılmıştır. Sınıflandırma algoritmalarına göre olasılığı 0.5'ten büyük olanlar öder, yani 1, 0.5'ten küçük olanlar ödemez, yani 0 olarak işaretlenir. Bu çalışmada doğruluğu ölçmek için sınıflandırma algoritmaları kullanılmış olsa da, telekomünikasyon şirketinin atamaları gerçekleştireceği platforma sağlanacak veriler, ödeme olasılıklarının ortalaması kullanılarak atamaların homojen olması yönünde geliştirilmiştir.
Çalışma toplam altı alt bölümden oluşmaktadır. Birinci bölümde, genel çerçeveyi aktaran giriş bölümünde problem incelenecek ve tez çalışmasının amacından bahsedilecektir. Sonrasında, bu alanda yapılmış çalışmalar incelenecektir. Üçüncü bölümde, teknik alt yapı hakkında bilgi aktarımı gerçekleşecektir. Dördüncü bölümde, makine öğrenmesi işlemlerinden en doğru sonuçları elde edebilmek amacıyla veri üzerinde yapılan işlemlere değinilecektir. Ayrıca yine bu bölümde değinilen öznitelik seçimi için kullanılan farklı teknikler ile veri altkümeleri yaratılacaktır. Son bölümde ise veri kümesi üzerinde gerekli düzeltmeler yapıldıktan sonra, oluşturulmuş bu alt veri kümelerinin modeller üzerindeki performansları karşılaştırılacaktır. Son bölüm olan Bölüm 6'da ise tez çalışmasından elde edilen sonuçlar yorumlanmıştır. 
İlk olarak, telekomünikasyon şirketinden temin edilen ~327K farklı müşteri içeren 2018 yılına ait veri kümesi üzerinde çalışma yapılmıştır. Veri temizlenip, boş değerler doldurulup, gereksiz veriler elenip, en son aşamada ilgili yeni öznitelikler de eklendikten sonra, birkaç farklı yöntem ile öznitelik önem sıralaması yapılacaktır. Bu sıralama ile veriler makine öğrenmesi modellerinde uygulandıktan sonra, en iyi doğruluk sonucunu hangi öznitelik alt kümesi ile belirlendiği ortaya konacaktır. En az sayıda öznitelik ile en doğru sonucu veren model bulunmaya çalışılmıştır. Telekomünikasyon şirketinden alınan 18 öznitelik, çalışma kapsamında 38 özniteliğe kadar türetilmiştir. Öznitelik seçim yöntemleri olarak, ağaç temelli seçim yöntemlerinin ortalama değerleri, Temel Bileşen Analizi, Özyinelemeli Lojistik Regresyon, Özyinelemeli Adaboost, ki-kare testlerinden elde edilen öznitelik önem listeleri en etkiliden en az etkiliye doğru sırasıyla, öznitelik sayısı artırılarak modellerde işlenmiştir. Çalışmada kullanılan modeller, Lojistik Regresyon (LR), Karar Ağacı (KA), Naive Bayes, K-en yakın komşu, Adaboost, Bagging, Rastgele Ormanlar, Gradyen Boosting, XGB (Extra Gradyen Boosting), Extra Ağaçlar ve Yapay Sinir Ağı (YSA)'dır. En iyi sonuç; 38 özniteliğin ağaç modellerinin uygulanmasıyla elde edilmiş önem sırasına göre ilk 33 öznitelik ile gradyen boosting modellemesiyle elde edilmiştir Bu değerin de 74,28 olduğu gözlenmiştir.

Abstract:
In order for companies to maintain their assets, they must receive the provisions of the services they provide to their customers. Therefore, they can get their own funding and keep improving. 
However, invoices that are not paid on time place a serious burden on companies. Instead of continuing to develop and putting forward new products, companies are trying to collect these receivables and are experiencing a loss of performance within their own structure and are unable to continue to develop and grow. 
The burden imposed by the customer who does not pay the debt should not be considered solely as the inability to collect the debt. At the same time, the company's resources for collection must be taken into account. The company is also exposed to both its employee effort loss and company assets (telephone, electricity, computers, etc.) expenses. For this reason, some companies outsource their collection to customers who do not pay their debt. In addition to the customer's debt to the telecommunications company, the outsourcing office tries to collect the debt from the customer by adding its own amount.
Within the scope of this thesis, the telecommunication company is also carrying out the collection of unpaid invoices with external sources. The company tries to collect from its customers who do not pay their debts and who are in legal proceedings with the help of law offices.
The current operation of the process that the company wants to optimize is to try to reach the customer by the employees of the company before dispatching the debtor to external sources and make efforts to collect the debt. Customers who do not pay their debt for 120 days are referred to law offices. First, these offices try to reach the customer themselves and make an effort to collect the debt, and for those who do not pay their debts, a lawsuit is filed and thus the process is started. 
Each month, the company transfers its customers who do not pay their debts in different amounts to the law offices for the collection to take place. Monthly average ~25K customers follow the law. This ~25K customer is distributed to offices in line with their performance. On a monthly basis, the company determines the performance of the offices according to the amount the offices manage to collect, and in line with this performance, the number of customer files to be assigned to that office in the following month is determined. 
The company regularly collects collection information from the offices every month. In this direction, it performs a performance calculation, determining the number of customers to be assigned the following month. The offices prefer to call among new customers first, as new customers arrive each month. Because they don't want to lose a new customer who is easy to collect by taking care of a customer they didn't get, even though they tried to get paid earlier. They are able to return to the past months after completing their new customer calls that month. The following month, ~25K new customers will be assigned to the offices again. This process continues until the end of the year. There are fewer appointments in December compared to other months. At the end of the year, all customer debts that have not been collected by the offices are recovered and redistributed.
In addition, offices are included in a performance system based on the amount they can collect from customers who have been transferred to them. The result from this performance system is effective in the number of customers that the office will take over from the telecommunications company next month. In this context, the company wants the customers assigned to these offices to be homogenous in order to make a more accurate assessment. 
However, during this assignment process, the randomization of customer assignment can lead to subjective. For example, having high debt amounts assigned to an office or being clustered in a geographic area of Turkey where customers live may have an impact on the amount of collection. 
Offices will be evaluated in a fair and transparent manner thanks to equally difficult and homogeneous assignments. 
In addition, this performance account is required to be accurate both for the bureau to be able to continue to get new customers to make more money and for the company to increase the amount of collection it will obtain by making accurate assignments. If the company makes the right assignments, it can increase the amount of collection that it will get more customers to right office that is able to make the high collection. In order for this assignment to be fair, customers sent to offices must be of equal difficulty. The word difficulty meaning here is the possibility of collecting the customer's debt.
However, the company wants to make efforts for the most optimized and fair progress of this process. 
In the thesis study, the customer samples will be examined and the potential to pay the customer's debt will be foreseen and the probability of paying back the debt will be calculated for each customer. After this, it is planned to assign customers in uniform difficulty on the basis of office by using these probability values.
Classification was made within the scope of this study. According to classification algorithms, those whose probability are greater than 0.5 that means customer pays, target variable is set to 1, those less than 0.5 that means customer doesn't pay, target variable is marked as 0. Although classification algorithms were used to measure accuracy in this study, data to be provided to the platform on which the telecommunications company would perform the assignments was developed to make the assignments homogeneous using the average of the payout probabilities.
First, work has been done on the dataset for 2018, which includes ~327K different customers sourced from the telecommunications company. 
The 18 attributes taken from the telecommunications company are derived up to 38 attributes within the scope of the study. 
After deciding the models to be applied on the data, the procedures for using the data to train the models are listed below. First, the content of the data received from the company will be mentioned and they will be visualized. Then, with the interpretation of the data, the operations on the data will be decided. Data cleanup, data demotion, data expansion, categorization, normalizing continuous data, coding categorized data has been performed. To further increase the accuracy rate, the operations of K-fold crossover, decomposing the dataset as training and testing, and random reordering of the cluster were run on the data. In order to sort the attributes from the most important to the least effective in the next model-ready, cleaned dataset, the charts obtained by using attribute importance methods are mentioned. In attribute selection methods, the values obtained by normalizing and averaging the results obtained from attribute importance lists first obtained by tree-based and ensemble-based methods are listed. Then the basic component analysis method was applied to the dataset. The logistic regression and adaboost algorithms were then given to the recursively operating model, and their results are listed below, respectively. Finally, the severity of the attributes is listed according to the chi-square test.
On data set, features obtained from attribute inference and attribute selection stages from the most effective to the least effective, respectively, are increased and processed in models.
Decision trees, nearest neighbor, naive bayes, logistic regression, artificial neural networks and ensemble methods are frequently preferred in the literature using supervised learning methods to estimate the behavior of customers on payment will be tried. In this section, models will be examined comparatively in terms of their performance in forecasting achievements.
After the model was trained with the training dataset, measurements were made so that the consistency and accuracy of the model could be observed by applying it to the test dataset as well. As a result of these measurements, decision trees and tree-based boosting methods and selected attribute subsets cannot achieve high success rates on Decision Trees models, while the subset that gives the best results on the boosting models has been. The best result was an extra gradient Boost algorithm for attribute ranking using tree-based methods, which achieved an accuracy rate of 74.28. Instead of using 38 attributes, a higher accuracy value was reached than we would get with 33 attributes and 38 attributes. Both the running time of the model has been shortened and its accuracy has increased. Attributes not included are transfer_maas_yatma_araligi, transfer_gunu_araligi, bayram_var, legal_faiz, legal_faiz_bolu_toplam. The meaning of these attributes is, in order of effect, whether the assignment of the client is in the period in which the salary will be paid, which period of the month the assignment comes to, whether it is feast or not, legal interest amount operated by the state over the amount of debt, the effect of the legal interest amount on the total debt.The model that gives the most accurate result with the least number of attributes has been attempted.
The study consists of a total of six subdivisions. In the first section, the problem will be examined in the introduction section which conveys the general framework and the purpose of the thesis study will be mentioned. Later, studies in this field will be examined. In the third section, information about the technical infrastructure will be transferred. In the fourth section, the processes performed on the data will be discussed in order to obtain the most accurate results from machine learning processes. In addition, data subsets will be created with the different techniques used for attribute selection mentioned in this section. In the last section, the performance of these created sub-datasets on the models will be compared after the necessary corrections are made on the dataset. In the last chapter, Section 6, the results from the thesis study were interpreted.