Apache Spark Tabanlı Destek Vektör Makıneleri İle Akan Büyük Veri Sınıflandırma

thumbnail.default.alt
Tarih
2016-06-16
Yazarlar
Akgün, Barış
Süreli Yayın başlığı
Süreli Yayın ISSN
Cilt Başlığı
Yayınevi
Fen Bilimleri Enstitüsü
Instıtute of Science and Technology
Özet
Klasik veri analizi yöntemlerinde, verilerin herhangi bir veri merkezinde toplanması ve veri madenciliği yöntemleri ile analiz edilerek anlamlı sonuçların çıkarılması gerekmektedir. Son yıllarda, gerek sosyal ağların gerek ise makinelerin ürettikleri veri miktarları çok ciddi boyutlardadır. Üretilen büyük miktardaki verileri saklamak yüksek maliyetli olmakla beraber bu denli büyük miktarda veriyi biriktirerek analiz etmek yine aynı şekilde ciddi zaman gerektirmektedir. Günümüz rekabet ortamında bir saniyenin dahi önemi oldukça büyüktür. Öyle ki sosyal ağlarda bir saniyede firmanız hakkında binlerce yorum yapılırken sizin buna sessiz kalmanız ciddi sonuçlara sebebiyet verecektir. Tüm bu ihtiyaçlar veri analizinin, biriktirilen veriler üzerinden değil verinin geldiği anda anlık veri üzerinden yapılması gerekliliğini doğurmuştur. Anlık veri üzerinden yapılan çalışmalar bilişim dünyasında akan veri analizi başlığı altında toplanmaktadır. Sınıflandırma yöntemleri, veri madenciliği yöntemleri içinde en yaygın olarak kullanılan yöntemlerden bir tanesidir. Hemen her sektörde sınıflandırma problemlerine rastlamak mümkündür. Sınıflandırma problemlerinin çözümü için kullanılan algoritmaların başında, yüksek doğruluk oranı ve düşük kod karmaşıklığı ile Lojistik Regresyon (LR) ve yüksek doğruluk oranı ile Destek Vektör Makineleri (DVM) gelmektedir. Akan veri analizi yöntemlerinde en çok aranan özellik, gelen anlık verinin boyutuna bakılmaksızın olabildiğince hızlı olarak analiz edilebilmesidir. Bu sebebten LR ve DVM yöntemleri akan veri sınıflandırma problemi için de son derece uygundur. Çalışmanın amacı büyük akan veri problemleri çözümü için sıklıkla kullanılan Apache Spark Streaming teknolojisi üzerine DVM sınıflandırma yöntemini geliştirmektir. Geliştirilen DVM çözümünün hali hazırda var olan LR yöntemi ile karşılaştırarak hangi yöntemin akan büyük veri sınıflandırmada daha etkin olduğunu bulmak ise çalışmanın bir diğer amacıdır. Yapılan çalışmada öncelikli olarak, kullanılan sahtecilik veri kümesi için LR ve DVM yöntemlerinin başarımlarını analiz etmek adına birikmiş veri üzerinden SAS ürünü kullanılarak deneyler yapılmıştır. Bunun yanı sıra LR performansını arttırabilmek adına Stepwise yöntemi kullanılarak ek deneyler yapılmıştır. DVM ve LR yöntemlerinin başarımlarını incelemek için ROC değerleri ve çalışma süreleri ele alınmıştır. Akan veri analizi yöntemleri için bahsedildiği üzere doğruluk kadar çalışma zamanı da önemli bir performans metriğidir. Yapılan deneylerde karşılaşılan problemlerin başında SAS ile tek makine de yapılan analizlerin büyük veri kümesi üzerinde bellek yetersizliği sebebi ile sonlanamaması gelmektedir. İlgili problemi çözmek adına veri kümeleri özellik seçimi yöntemi ile küçültülerek deneyler yapılmış ve DVM yönteminin daha başarılı sonuçlar verdiği gözlemlenmiştir. Sınıflandırma probleminin çözümünde DVM yönteminin başarılı olduğu gözlemlendikten sonra ilgili DVM yöntemi akan veri üzerine uyarlanmaya çalışılmıştır. Akan büyük veri teknolojisi olarak Apache Spark Streaming seçilmiştir. Apache Spark Streaming ve Apache Spark MLlib teknolojileri kullanılarak DVM yöntemi akan veri üzerine uyarlanmıştır. Apache Spark Streaming teknolojisi ile beraber gelen mevcut akan LR yöntemi ile sonuçlar karşılaştırılmış ve geliştirilen DVM yönteminin kullanılan veri kümeleri üzerinde daha başarılı sonuçlandığı gözlemlenmiştir. Öte yandan Apache Spark teknolojisi paralel programalama modeli ile çalışmaktadır. Geliştirilen akan DVM yöntemin dağıtık bilgisayarlara getirdiği yük incelendiğinde mevcut akan LR yöntemi ile benzer sonuçlar çıktığı gözlemlenmiştir.
Nowadays, data is automatically generated at an increasing rate from mobile applications, sensor applications, log records, click-streams, call detail records, email, twitter posts and others. Much of these massive data is valuable at its time of received, therefore these types of data is called data stream and has to be analyzed in real time. Data mining is the best technique for analyzing datasets and then extracting the meaning of the data. The data stream is a real-time, continuous, ordered sequence of items, hence the arrival order of data records are not certain and keeping the all stream data records in local memory are not feasible. Stream data mining involves extracting knowledge from real-time actions. Mostly these real-time actions produce a massive high rate volume of data. The stream data mining approaches must handle these massive (big) and high rate data in very short time. Classification methods are used for predicting the target class for each records in given dataset. Classification problems are the most common data mining tasks, therefore they are used for solving huge amount of business problems; such us, credit risk analysis, churn analysis etc. Binary classification problems whose target class may take just two values are the simplest type of classification problems in data mining, therefore all stream data mining technologies firstly handle binary classification problems. Logistic Regression and Support Vector Machines analysis are one of the widely used techniques in binary classification. Implementing Logistic Regression and Support Vector Machines are not complex and they are very efficient algorithms, therefore these two algorithms are good choices for modelling and predicting the behavior of massive stream data. In this work, to satisfy the real time binary classification problem, we present Support Vector Machine algorithm for classifying given datasets. Our steps for presenting the streaming Support Vector Machines can be summarized as follows; We firstly try to find which technique (Logistic Regression or Support Vector Machines) is the best one for solving binary classification problem. The SAS pre-defined Logistic Regression, Logistic Regression wtih Stepwise and Support Vector Machines functions are used for comparing the performances of these two algorithms on our datasets. Since our dataset is too massive, SAS Support Vector Machine on single machine can not produce any results and it returns memory exception. To compare these two algorithms, Support Vector Machine memory problem must be solved, therefore we choose a subset of given dataset. To standardize the range of independent features of data, we also normalize all the features for in our dataset. After feature scaling, we handle another normalized second training set for measuring the performance. The experiments for comparing these two algorithms on SAS are executed on reduced dataset. The ROC area and execution time are chosen for performance metrics. After all experiments are completed on SAS, Support Vector Machines is more accurate than Logistic Regression, on the other hand the training execution times are almost similar for both Logistic Regression and Support Vector Machines. To apply Support Vector Machine on stream data, streaming data challenges and streaming data analysis technologies are investigated deeply. The streaming technologies have to be ready for data analysis at any time and the arrival data rate in the streams may be very fast, which may result in crashing if too many items arrive. The streaming technologies must be process that fast data in very short time with limited memory. The other challenge is that streaming technologies have to include powerful error handling mechanism because the stream data can not be reproduced most of times. These are the two main challenges for streaming data analysis. The first task is to determine the best stream technologies which can handle effectively these two main challenges. There are lots of open source and commercial effective platforms for solving streaming data analysis problems. Two of the most known ones are Apache Storm and Apache Spark Streaming, hence we focused on these two real time data analysis technologies. Both these two streaming technologies use paralel programing, so they are very fast on real time big data. However, the Apache Spark Streaming has more effective error handling mechanism than Apache Storm. Apache Spark Streaming receives data streams from sources and divides these stream data into mini batches. These mini batches are sent to Spark engine for processing. Since the job is executed on Spark engine, Apache Spark Streaming performs data parallel computations while Apache storm performs task parallel computations. Apache Storm restarts the worker node if any error occurs, on the other hand Apache Spark Streaming can continue with an other copy of data if any error occurs becuase of data paralel mechanism. In this study, Apache Spark Streaming is used for stream data analysis due to its better fault tolerance mehanism. Moreover it uses Apache Spark for job execution which results in a shorter development time comparing to Apache Storm. After the selection of right algorithm and streaming technology, the same experiments are executed on Apache Spark distributed environment which has six nodes for performing data analysis. Apache Spark MLlib Support Vector Machine and Logistic Regression algorithm performances are compared with using our dataset and Support Vector Machine again shows better performance than Logistic Regression. Apache Spark Streaming has already Logistic Regression algorithm for stream real time data but it has not yet Support Vector Machine implementation for streaming data. Apache Spark MLlib Support Vector Machine algorithm is implemented on Apache Spark Streaming technology with using Scala programming language. To test our Support Vector Machine implementation, we run our experiments on stream data with using existing Logistic Regression and our Support Vector Machine implementation. The performance results of our implementation are very similar with existing Logistic Regression. The Apache Spark is the paralel programming model, therefore we also look the cluster health when our implemented Support Vector Machine and existing Logistic Regression codes are executed on distributed mode. Actually, the CPU, network and HDFS I/O performance are examined for seeing the cluster health when the both algorithms’ code executed on it. Support Vector Machine and Logistic Regression algorithms cause almost same costs on cluster. At the end the of our work, the results are very promising and we believe that streaming data analysis will become more important at near future.
Açıklama
Tez (Yüksek Lisans) -- İstanbul Teknik Üniversitesi, Fen Bilimleri Enstitüsü, 2016
Thesis (M.Sc.) -- İstanbul Technical University, Instıtute of Science and Technology, 2016
Anahtar kelimeler
Büyük Veri, Apache Spark, Destek Vektör Makineleri, Akan Veri, Akan Büyük Veri, Big Data, Apache Spark, Support Vector Machine, Streaming Data, Big Data Streaming
Alıntı