Monday, June 3, 2019

Lazy, Decision Tree classifier and Multilayer Perceptron

Lazy, Decision Tree classifier and Multi stage PerceptronPerformance Evaluation of Lazy, Decision Tree classifier and Multilayer Perceptron on Traffic Accident AnalysisAbstract. Traffic and road virgule atomic number 18 a big issue in e rattling country. Road chance influence on many social occasions such as property damage, distinct injury train as well as a large amount of death. Data science has such capability to assist us to analyze diametrical factors behind job and road accident such as weather, road, time etc. In this paper, we proposed different loting and compartmentalisation techniques to analyze data. We implemented different miscellanea techniques such as Decision Tree, Lazy classifier, and Multilayer perceptron classifier to classify dataset based on casualty class as well as compacting techniques which ar k- subject matter and Hierarchical clustering techniques to cluster dataset. Firstly we analyzed dataset by using these classifiers and we achieved ac curacy at slightly level and later, we utilize clustering techniques and indeed applied classification techniques on that clump data. Our accuracy level increased at some level by using clustering techniques on dataset comp atomic number 18d to a dataset which was separate without clustering.Keywords Decision guide, Lazy classifier, Multilayer perceptron, K-means, Hierarchical clusteringINTRODUCTIONTraffic and road accident are one of the important problem across the world. Diminishing accident ratio is to the highest degree effective stylus to improve traffic safety. There are many type of research has been done in many countries in traffic accident analysis by using different type of data mining techniques. Many researcher proposed their work in order to undertake the accident ratio by identifying risk factors which particularly impact in the accident 1-5. There are alike different techniques utilize to analyze traffic accident but its stated that data mining technique is more advance technique and shown better results as compared to statistical analysis. However, both methods provide appreciable outcome which is helpful to reduce accident ratio 6-13, 28, 29.From the experimental point of view, mostly studies tried to find out the risk factors which affect the severity levels. Among most of studies explained that drinking alcoholic beverage and driving influenced more in accident 14. It identified that drinking alcoholic beverage and driving seriously increase the accident ratio. There are various studies which have centreed on restraint devices like helmet, seat belts influence the severity level of accident and if these devices would have been used to accident ratio had decreased at certain level 15. In addition, few studies have focused on identifying the group of drivers who are mostly relate in accident. Elderly drivers whose age are more than 60 eld, they are identified mostly in road accident 16. Many studies provided different level of risk factors which influenced more in severity level of accident.Lee C 17 stated that statistical approaches were good option to analyze the relation between in various risk factors and accident. Although, Chen and Jovanis 18 identified that there are some problem like large contingency table during analyzing big dimensional dataset by using statistical techniques. As well as statistical approach also have their own violation and assumption which kindle bring some error results 30-33. Because of these limitation in statistical approach, Data techniques came into existence to analyze data of road accident. Data mining often called as knowledge or data discovery. This is set of techniques to achieve hidden information from large amount of data. It is shown that there are many implementation of data mining in tape drive system like pavement analysis, roughness analysis of road and road accident analysis.Data mining techniques has been the most widely used techniques in domain like a griculture, medical, transportation, business, industries, engineering and many other scientific fields 21-23. There are many diverse data mining methodologies such as classification, standstill rules and clustering has been extensivally used for analyzing dataset of road accident 19-20. Geurts K 24 analyzed dataset by using association rule mining to know the different factors that happens at very high frequency road accident areas on Belgium road. Depaire 25 analyzed dataset of road accident in Belgium by using different clustering techniques and stated that clustered based data can extract better information as compared without clustered data. Kwon analyzed dataset by using Decision Tree and NB classifiers to factors which is bear on more in road accident. Kashani 27 analyzed dataset by using classification and regression algorithm to analyze accident ratio in Iran and achieved that there are factors such as wrong overtaking, not using seat belts, and badly speeding affected th e severity level of accident.METHODOLOGYThis research work focus on casualty class based classification of road accident. The paper describe the k-means and Hierarchical clustering techniques for cluster analysis. Moreover, Decision Tree, Lazy classifier and Multilayer perceptron used in this paper to classify the accident data.Clustering TechniquesHierarchical ClusteringHierarchical clustering is also known as HCS (Hierarchical cluster analysis). It is unsupervised clustering techniques which adjudicate to make clusters hierarchy. It is divided into two categories which are Divisive and Agglomerative clustering.Divisive Clustering In this clustering technique, we allocate all of the inspection to one cluster and later, partition that single cluster into two similar clusters. Finally, we continue repeatedly on every cluster till there would be one cluster for every inspection.Agglomerative method It is bottom up approach. We allocate every inspection to their own cluster. Later, ev aluate the maintain between every clusters and then integrate the most two similar clusters. Repeat steps second and third until there could be one cluster left. The algorithm is given below X set A of objects a1, a2,an Distance function is d1 and d2 For j=1 to n dj=aj end for D= d1, d2,..dn Y=n+1 while D.size1 do-(dmin1, dmin2)=minimum distance (dj, dk) for all dj, dk in all D-Delete dmin1 and dmin2 from D-Add (dmin1, dmin2) to D-Y=Y+1 end whileK-modes clusteringClustering is an data mining technique which use unsupervised learning, whose major aim is to categorize the data features into a distinct type of clusters in such a way that features inside a group are more alike than the features in different clusters. K-means technique is an extensively used clustering technique for large mathematical data analysis. In this, the dataset is grouped into k-clusters. There are diverse clustering techniques available but the assortment of appropriate clustering algorithm rely on the natur e and type of data. Our major objective of this work is to differentiate the accident places on their frequency occurrence. Lets assume thatX and Y is a matrix of m by n matrix of categorical data. The straightforward closeness coordinating measure amongst X and Y is the quantity of coordinating quality estimations of the two judges. The more renowned the quantity of matches is more the comparability of two items. K-modes algorithm can be explained as d (Xi,Yi)= (1) Where - (2) course of instructionification TechniquesLazy ClassifierLazy classifier save the training instances and do no literal work until classification time. Lazy classifier is a learning strategy in which speculation past the preparation information is postponed until a fountainhead is made to the framework where the framework tries to sum up the training data onward getting queries. The main advantage of utilizing a lazy classification strategy is that the objective scope will be exacted locally, for example , in the k-nearest neighbor. Since the target capacity is approximated locally for each question to the framework, lazy classifier frameworks can simultaneously take maintenance of various issues and arrangement effectively with changes in the issue field. The burdens with lazy classifier incorporate the extensive space necessity to store the total preparing dataset. For the most part scratchy preparing information expands the case bolster pointlessly, in light of the fact that no idea is made amid the preparation stage and another detriment is that lazy classification strategies are generally slower to assess, however this is joined with a quicker preparing stage.K StarThe K star can be characterized as a strategy for cluster examination which fundamentally goes for the partition of n perception into k-clusters, where every perception has a location with the group to the closest mean. We can express K star as an occurrence based learner which utilizes entropy as a separation mea sure. The advantages are that it gives a predictable way to get across with treatment of genuine esteemed attributes, typical attributes and missing attributes. K star is a basic, instance based classifier, like K Nearest Neighbor (K-NN). new-made data instance, x, are doled out to the class that happens most every now and again among the k closest information focuses, yj, where j = 1, 2 k. Entropic separation is then used to recover the most comparable occasions from the informational index. By method for entropic remove as a metric has a number of advantages including treatment of genuine esteemed qualities and missing qualities. The K star function can be ascertained asK*(yi, x)=-ln P*(yi, x)Where P* is the likelihood of all transformational means from instance x to y. It can be valuable to comprehend this as the likelihood that x will touch base at y by means of an arbitrary stroll in IC highlight space. It will performed streamlining over the percent mixing proportion paramet er which is closely resembling K-NN sphere of influence, before appraisal with other Machine Learning strategies.IBK (K Nearest Neighbor)Its a k-closest neighbor classifier technique that utilize a similar separation metric. The quantity of closest neighbors whitethorn be illustrated unequivocally in the object editor or determined consequently utilizing blow one cross-approval center to a maximum point of project provided by the predetermined esteem. IBK is the knearest-neighbor classifier. A sort of divorce pursuit calculations might be used to quicken the errand of identifying the closest neighbors. A direct inquiry is the nonremittal yet promote decision blend ball trees, KD-trees, thus called cover trees. The dissolution work used is a parameter of the inquiry strategy. The rest of the thing is alike one the primer of IBL-which is called Euclidean separation different alternatives blend Chebyshev, Manhattan, and Minkowski separations. Forecasts higher than one neighbor may be weighted by their distance from the test occurrence and two unique equations are implemented for altering over the distance into a weight. The quantity of preparing occasions kept by the classifier can be limited by setting the window estimate choice. As new preparing occasions are included, the most seasoned ones are segregated to exert up the quantity of preparing cases at this size.Decision TreeRandom decision forests or random forest are a package learning techniques for regression, classification and other tasks, that perform by building a legion of decision trees at training time and resulting the class which would be the mode of the mean prospicience (regression) or classes (classification) of the separate trees. Random decision forests good for decision trees routime of overfitting to their training set. In different calculations, the classification is executed recursively till each and every undulate is clean or pure, that is the order of the data ought to be as impec cable as would be prudent. The goal is dynamically speculation of a choice tree until it picks up the balance of adaptability and exactness. This technique use the Entropy that is the computation of disorder data. Here Entropy is measured by Entropy () = Entropy () = Hence so total gain = Entropy () Entropy ()Here the goal is to increase the total gain by dividing total entropy because of diverging arguments by take account i.Multilayer PerceptronAn MLP might be observed as a logistic regression classifier in which input data is firstly altered utilizing a non-linear transformation. This alteration sell the input dataset into space, and the place where this turn into linearly separable. This layer as an intermediate layer is known as a hidden layer. One hidden layer is enough to create MLPs.Formally, a single hidden layer Multilayer Perceptron (MLP) is a function of f YIYO, where I would be the input size vector x and O is the size of output vector f(x), such that, in matrix notation F(x) = g((2)+W(2)(s((1)+W(1)x))) DESCRIPTION OF DATASETThe traffic accident data is obtained from online data source for Leeds UK 8. This data set comprises 13062 accident which happened since last 5 years from 2011 to 2015. After carefully analyzed this data, there are 11 attributes discovered for this study. The dataset consist attributes which are consider of vehicles, time, road surface, weather conditions, lightening conditions, casualty class, sex of casualty, age, type of vehicle, day and month and these attributes have different features like casualty class has driver, pedestrian, passenger as well as same with other attributes with having different features which was given in data set. These data are shown briefly in table 2 the true MEASUREMENTThe accuracy is defined by different classifiers of provided dataset and that is achieved a percentage of dataset tuples which is classified precisely by help of different classifiers. The confusion matrix is also called as error matrix which is just layout table that enables to visualize the behavior of an algorithm. Here confusing matrix provides also an important role to achieve the capacity of different classifiers. There are two class labels given and each cell consist prediction by a classifier which comes into that cell. hold over 1 confusion Matrix Correct Labels NegativePositiveNegative TN ( dependable negative)FN (False negative)PositiveFP (False positive)TP (True positive)Now, there are many factors like Accuracy, sensitivity, specificity, error rate, precision, f-measures, recall and so on.TPR (Accuracy or True Positive dictate) = FPR (False Positive Rate) = Precision = Sensitivity = And there are also other factors which can find out to classify the dataset correctly.RESULTS AND DISCUSSIONTable 2 describe all the attributes available in the road accident dataset. There are 11 attributes mentioned and their code, values, total and other factors included. We divided total accident value o n the basis of casualty class which is Driver, passenger, and Pedestrian by the help of SQL.Table 2S.NO.AttributeCodeValueTotal Casualty ClassDriverriderPedestrian1.No. of vehicles11 vehicle333476381775322 vehicle799156762215993+3 vehicle52141218510102. quantifyT10-4630269250110T24-890369813371T36-1227201701644374T412-16334218121027502T516-2039762387990598T620-2414967904982073.Road SurfaceOTROther106623013DRDry9828568726951445WTWet30631858803401SNWSnow1571013916FLD fill1711504.Lightening ConditionDLGTDay Light9020542223481249NLGTNo Light1446858389198SLGTStreet Light259813778054155.Weather ConditionCLR opened11584677031401666FGFog372673SNYSnowy6341156RNYRainy12767513501746.Casualty ClassDRDriverPSGPassengerPDTPedestrian7.Sex of CasualtyMMale7758522314601074FFemale5305243420827888.AgeMinor1976454855667Youth18-30 years426726461158462Adult30-60 years42543152742359Senior60 years256714057873749.Type of VehicleBSBus84252687102CRCar9208495926921556GDVGoodsVehicle44924586117BCLBicycle151214 761124PTVPTWW9778764852OTROther7949181110. DayWKDWeekday9884598024991404WNDWeekend31791677104345811.MonthQ1Jan-March30171731803482Q2April-June32201887907425Q3July-September33762021948406Q4Oct-December34522018884549Direct Classification AnalysisWe utilized different approaches to classify this bunch of dataset on the basis of casualty class. We used classifier which are Decision Tree, Lazy classifier and Multilayer perceptron. We attained some result to few level as shown in table 3Table 3ClassifiersAccuracyLazy classifier(K-Star)67.7324%Lazy classifier (IBK)68.5634%Decision Tree70.7566%Multilayer perceptron69.3031%We achieved some results to this given level by using these three approaches and then later we utilized different clustering techniques which are Hierarchical clustering and K-modes.Figure 1 Direct classified AccuracyAnalysis by using clustering techniquesIn this analysis, we utilized two clustering techniques which are Hierarchical and K-modes techniques, Later we divided dataset into 9 clusters. We achieved better results by using Hierarchical as compared to K-modes techniques.Lazy Classifier returnK Star In this, our classified result increased from 67.7324 % to 82.352%. Its sharp improvement in result after clustering.Table 4TP RateFP RatePrecisionRecallF-MeasureMCCROC AreaPRC AreaClass0.9560.3200.8090.9560.8760.6790.9280.947Driver0.5290.0290.8730.5290.6590.6000.9170.824Passenger0.8390.0270.8370.8390.8380.8110.9810.906PedestrianIBK In this, our classified result increased from 68.5634% to 84.4729%. Its sharp improvement in result after clustering.Table 5TP RateFP RatePrecisionRecallF-MeasureMCCROC AreaPRC AreaClass0.9450.2540.8400.9450.8900.7170.9500.964Driver0.6440.0480.8330.6440.7260.6510.9400.867Passenger0.8160.0180.8840.8160.8490.8260.9900.946PedestrianDecision Tree OutputIn this study, we used Decision Tree classifier which improved the accuracy better than ear

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.