One-pass MapReduce-based clustering method for mixed large scale data

Big data is often characterized by a huge volume and a mixed types of attributes namely, numeric and categorical. K-prototypes has been fitted into MapReduce framework and hence it has become a solution for clustering mixed large scale data. However, k-prototypes requires computing all distances between each of the cluster centers and the data points. Many of these distance computations are redundant, because data points usually stay in the same cluster after first few iterations. Also, k-prototypes is not suitable for running within MapReduce framework: the iterative nature of k-prototypes cannot be modeled through MapReduce since at each iteration of k-prototypes, the whole data set must be read and written to disks and this results a high input/output (I/O) operations. To deal with these issues, we propose a new one-pass accelerated MapReduce-based k-prototypes clustering method for mixed large scale data. The proposed method reads and writes data only once which reduces largely the I/O operations compared to existing MapReduce implementation of k-prototypes. Furthermore, the proposed method is based on a pruning strategy to accelerate the clustering process by reducing the redundant distance computations between cluster centers and data points. Experiments performed on simulated and real data sets show that the proposed method is scalable and improves the efficiency of the existing k-prototypes methods.


Introduction
Large volume of data are being collected from different sources and there is a high demand for methods and tools that can efficiently analyse these large volume of data referred to as Big data analysis.Big data usually refers to three mains characteristics also called the three Vs (Gorodetsky 2014) which are respectively Volume, Variety and Velocity.Volume refers to the large scale data, Variety indicates the mixed types of data such as numeric, categorical and text data.Velocity refers to the speed at which data is generated and processed (Gandomi and Haider 2015).Several frameworks have been proposed for processing Big data.The most well-known is MapReduce framework (Dean and Ghemawat 2008).MapReduce is initially developed by Google and it is designed for processing Big data by exploiting the parallelism among a cluster of machines.MapReduce has three major features: simple programming framework, linear scalability and fault tolerance.These features make MapReduce an useful framework for Big data processing (Lee et al. 2012).
Clustering is an important technique in machine learning, which has been used to organize data into groups of similar data points called also clusters.Examples of clustering methods categories are hierarchical methods, density-based methods, grid-based methods, model-based methods and partitional methods (Jain et al. 1999).These clustering methods were well used in several applications such as intrusion detection (Tsai et al. 2009;Wang et al. 2010), customer segmentation (Liu and Ong 2008), document clustering (Ben N'Cir and Essoussi 2015; Hussain et al. 2014), image organization (Ayech and Ziou 2015;Du et al. 2015).In fact, conventional clustering methods are not suitable when dealing with large scale data.This is explained by the high computational cost of these methods which require unrealistic time to build the groupings.Furthermore, some clustering methods like hierarchical clustering cannot be applied to Big data because of its quadratic complexity time.Hence, clustering methods with linear time complexity should be used to handle large scale data.
On the other hand, Big data is often characterized by the mixed types of data including numeric and categorical.K-prototypes is one of the most well-known clustering methods to deal with mixed data, because of its linear time complexity (Ji et al. 2013).It has been successfully fitted into MapReduce framework in order to perform the clustering of mixed large scale data Ben Haj Kacem et al. (2015Kacem et al. ( , 2016)).However, the proposed methods have some considerable shortcomings.The first shortcoming is inherit from the conventional k-prototypes method, which requires computing all distances between each of the cluster centers and the data points.Many of these distance computations are redundant, because data points usually stay in the same cluster after first few iterations.The second shortcoming is the result of inherent conflict between MapReduce and k-prototypes.K-prototypes is an iterative algorithm which requires to perform some iterations for producing optimal results.In contrast, MapReduce has a significant problem with iterative algorithms (Ekanayake et al. 2010).As a consequence, the whole data set must be loaded from the file system into the main memory at each iteration.Then, after it is processed, the output must be written to the file system again.Therefore, many of I/O disk operations occur during each iteration and this decelerates the running time.
In order to overcome the mentioned shortcomings, we propose in this paper a new onepass Accelerated MapReduce-based K-Prototypes clustering method for mixed large scale data, referred to as AMRKP.The proposed method is based on a pruning strategy to accelerate the clustering process by reducing the redundant distance computations between cluster centers and data points.Furthermore, the proposed method reads the data set only once in contrast to existing MapReduce implementation of k-prototypes.Our solution decreases the time complexity of k-prototypes (Huang 1997) from O(n.k.l) to O((n.α%.k + k 3 ).l)and the I/O complexity of MapReduce-based k-prototypes method (Ben Haj Kacem et al. 2015) from O( n p .l) to O( n p ) where n the number of data points, k the number of clusters, α% the pruning heuristic, l the number of iterations and p the number of chunks.
The rest of this paper is organized as follows: Section 2 provides related works which propose to deal with large scale and mixed data.Then, Section 3 presents the k-prototypes method and MapReduce framework.After that, Section 4 describes the proposed AMRKP method while Section 5 presents experiments that we have performed to evaluate the efficiency of the proposed method.Finally, Section 6 presents conclusion and future works.

Related works
Given that data are often described by mixed types of attributes such as, numeric and categorical, a pre-processing step is usually required to transform data into a single type since most of proposed clustering methods deal with only numeric or categorical attributes.However, transformation strategies is often time consuming and produces information loss, leading to inaccurate clustering results (Ahmad and Dey 2007).Therefore, clustering methods have been proposed in the literature to perform the clustering of mixed data without pre-processing step (Ahmad and Dey 2007;Ji et al. 2013;Huang 1997;Li and Biswas 2002).For instance, Li and Biswas (2002) introduced the Similarity-Based Agglomerative Clustering called SBAC, which is an hierarchical agglomerative algorithm for mixed data.Huang (1997) proposed k-prototypes method which integrates k-means and k-modes methods to cluster numeric and categorical data.Ji et al. (2013) proposed an improved k-prototypes to deal with mixed type of data.This method introduced the concept of the distributed centroid for representing the prototype of categorical attributes in a cluster.Among the latter discussed methods, k-prototypes remains one of the most popular method to perform clustering from mixed data because of its efficiency (Ji et al. 2013).Nevertheless, it can not scale with huge volume of mixed data.
To deal with large scale data, several clustering methods which are based on parallel frameworks have been designed in the literature (Bahmani et al. 2012;Hadian and Shahrivari 2014;Kim et al. 2014;Ludwig 2015;Shahrivari and Jalili 2016;Zhao et al. 2009).Most of these methods use the MapReduce framework.For instance, Zhao et al. (2009) have implemented k-means method through MapReduce framework.Bahmani et al. have proposed a scalable k-means (Bahmani et al. 2012) that extends k-means++ technique for initial seeding.Shahrivari and Jalili (2016) have proposed a single-pass and linear time MapReduce-based k-means method.Kim et al. (2014) have proposed parallelizing densitybased clustering with MapReduce.A parallel implementation of fuzzy c-means algorithm into MapReduce framework is presented in Ludwig (2015).
On the other hand, several methods have used the triangle inequality property to improve the efficiency of the clustering application (He et al. 2010;Nanni 2005).The triangle inequality is used as an exact mathematical property method in order to reduce the number of redundant unnecessary distance computations.In fact, the triangle inequality property is based on the hypothesis that is unnecessary to evaluate distances between a data point and clusters centers which are not closer to the old assigned center.For example, He et al. (2010), have proposed an accelerated Two-Threshold Sequential Algorithm Scheme (TTSAS).This method avoids unnecessary distance calculations by applying the triangle inequality.Nanni (2005) have exploited triangle inequality property of metric space to accelerated the hierarchical clustering method (single-link and complete-link).Although obtained clusters with these discussed methods are exactly the same as the standard ones, they require evaluating the triangle inequality property for all the set of clusters' center.Furthermore, these methods keep the entire data in the main memory for processing which reduces their performance on large data sets.
Although the later discussed methods offer for users an efficient analysis of large scale data, they can not support the mixed types of data and are limited to only numeric attributes.In order to perform the clustering of mixed large scale data, Ben Haj Kacem et al. (2015) proposed a parallelization of k-prototypes method through MapReduce framework.This method iterates two main steps until convergence: the step of assigning each data point to the nearest cluster center and the step of updating cluster centers.These two steps are implemented in map and reduce phase respectively.Although this method proposes an effective solution for clustering mixed large scale data, it has some considerable shortcomings.First, k-prototypes requires computing all distances between each of the cluster centers and the data points.However, many of these distance computations are redundant.Second, k-prototypes is not suitable for running within MapReduce framework since during each iteration of k-prototypes, the whole data set must be read and written to disks and this requires lots of I/O operations.

Preliminaries
This section first presents the k-prototypes method, then presents the MapReduce framework.

K-prototypes method
Given a data set X = {x 1 . . .x n } containing n data points, described by m r numeric attributes and m t categorical attributes, the aim of k-prototypes (Huang 1997) is to find k clusters by minimizing the following objective function: where u ij ∈ {0, 1} is an element of the partition matrix U n * k indicating the membership of data point i in cluster j , c j ∈ C = {c 1 . . .c k } is the center of the cluster j and d(x i , c j ) is the dissimilarity measure which is defined as follows: where x ir represents the value of numeric attribute r and x it represents the value of categorical attribute t for data point i. c jr represents the mean of numeric attribute r and cluster j , which can be calculated as follows: where c j the number of data points assigned to cluster j .c jt represents the most common value (mode) for categorical attributes t and cluster j , which can be calculated as follows: where where For categorical attributes, δ(p, q) = 0 when p = q and δ(p, q) = 1 when p = q.It is easy to verify that the dissimilarity measure given in (2), is a metric distance since it satisfies the non-negativity, symmetry, identity and triangle inequality property as follows (Han et al. 2011;Ng et al. 2007): The main algorithm of k-prototypes method is described by Algorithm 1.

MapReduce framework
MapReduce (Dean and Ghemawat 2008) is a parallel programming framework designed to process large scale data across cluster of machines.It is characterized by its highly transparency for programmers, which allows to parallelize algorithms in a easy and comfortable way.The algorithm to be parallelized needs to be specified by only two phases namely map and reduce.Each phase has < key/value > pairs as input and output.The map phase takes in parallel each < key/value > pair and generates one or more intermediate < key /value > pairs.Then, this framework groups all intermediate values associated with the same intermediate key as a list (known as shuffle phase).The reduce phase takes this list as input for generating final values.The whole process can be summarized as follows: Figure 1 illustrates the data flow of MapReduce framework.Note that the inputs and outputs of MapReduce are stored in an associated distributed file system that is accessible from any machine of the used cluster.As we mentioned earlier, MapReduce has a significant problems with iterative algorithms (Ekanayake et al. 2010).Hence, many of I/O operations occur during each iteration and this decelerates the running time.Several solutions have been proposed for extending the MapReduce framework to support iterations such as Twister (Ekanayake et al. 2010), Spark (Zaharia et al. 2010) and Phoenix (Talbot et al.

One-pass accelerated MapReduce-based k-prototypes clustering method for mixed large scale data
This section presents the proposed pruning strategy and the one-pass parallel implementation of our solution, followed by the parameters selections and the complexity analysis of the proposed method.

Pruning strategy
In order to reduce the number of unnecessary distance computations, we propose a pruning strategy, which requires a pruning heuristic α% to denote the α% subset of cluster centers that are considered when evaluating triangle inequality property.The proposed pruning strategy is based on the following assumptions: -data points usually stay in the same cluster after first few iterations.
-If an assignment of an object has changed from one cluster to another, then the new cluster center is close to the old assigned center.
This strategy is inspired from marketing where there are a host of products in a particular category that they are aware of, but only a few they would actively consider for purchasing (Eliaz and Spiegler 2011).This is known as consideration set.While all of the products that a consumer will think of when it's time to make a purchasing decision (known as the awareness set), the consideration set includes only those products they would consider a realistic option for purchase.In our case, we define the consideration set of centers as the set of α% closest centers from a given old assigned center.The selected assignment of a data object will be the closest center among the "consideration set" of cluster centers.
The pruning strategy requires at each iteration computing distances between centers and sorting them.Then, it evaluates the triangle inequality property until the property is not satisfied or all centers in the subset of selected centers (the consideration set) have been evaluated.In other words, it evaluates the following theorem between data point and the centers in increasing order of distance to the assigned center of the previous iteration.If the pruning strategy reaches a center that does not satisfy the triangle inequality property, it can skip all the remaining centers and continues on to the next data point.
Theorem 1 Let x i a data point, c 1 its cluster center of the previous iteration and c 2 another cluster center.If we know that d(c Notably, setting the pruning heuristic α% too small may decrease the accuracy rate whereas setting the α% to too large imposes a limit on the number of distance computations that can be reduced.The impact of the pruning heuristic on the performance of the proposed method will be discussed in Section 5.5.Algorithm 2 describes the different steps of the pruning strategy.
Algorithm 3 gives the main algorithm of k-prototypes with pruning strategy which we call it KP+PS algorithm in the rest section of the paper.Initially, the KP+PS algorithm works exactly the same as k-prototypes.Then, it continues to check whether it is time to start the pruning strategy.If the time to start is reached, the pruning strategy is applied.

Parallel implementation
The proposed AMRKP method towards handling mixed large scale data consists of the parallelization of KP+PS algorithm based on the MapReduce framework.For this purpose, we first split the input data set into p chunks.Then, each chunk is processed independently in parallel way by its assigned machine.The intermediate centers are then extracted from each chunk.After that, the set of intermediate centers is again processed in order to generate the final cluster centers.The chunks are processed in the map phase while the intermediate centers are processed in the reduce phase.In the following, we first present the parallel implementation without considering MapReduce and then, we present how we have fitted the proposed solution using MapReduce framework.
To define the parallel implementation, it is necessary to define the algorithm that is applied on each chunk and the algorithm that is applied on the set of intermediate centers.
For both phases, we use the KP+PS algorithm.For each chunk, the KP+PS algorithm is executed and k centers are extracted.Therefore, if we have p chunks, after applying KP+PS algorithm on each chunk, there will be a set of k * p centers as the intermediate set.In order to obtain a good quality, we record the number of assigned data points to each extracted center.That is to say, we extract from each chunk, k centers and the number of data points assigned to each center.The number of assigned data points to each cluster center represents the importance of that center.Hence, we must extend the KP+PS algorithm to take into account the weighted data points when clustering the set of intermediate centers.In order to consider the weighted data points, we must change center update (3) and ( 4).If we take into account w i as the weight of data point x i , center of a final cluster must be calculated for numeric and categorical attributes using the following equations. where The parallel implementation of the KP+PS algorithm through MapReduce framework is straightforward.Each map task picks a chunk of data set, executes the KP+PS algorithm on that chunk and emits the extracted intermediate centers and their weights as the output.Once the map phase is finished, a set of intermediate weighted centers is collected as the output of the map phase, and this set of centers is emitted to a single reduce phase.The reduce phase takes the set of intermediate centers and their weights, executes again the KP+PS algorithm on them and returns the final centers as the output.Once the final cluster centers are generated, we assign each data point to the nearest cluster center.
Let X i the chunk associated to map task i, p the number of chunks, C w = C w 1 . . .C w p the set of weighted intermediate centers where C w i the set of weighted intermediate centers extracted from chunk i and C f the set of final centers.Algorithm 4 describes main steps of the proposed method.

Parameters selections
The proposed method needs three input parameters in addition to the number of clusters k.The first parameter is the chunk size, the second parameter is pruning heuristic α% and the third parameter is the time to start the pruning strategy.

Tuning the chunk size
In theory, the minimum chunk size is k and the maximum chunk size is n.However, both of these extremes are not practical and value between k and n must be selected.According to Shahrivari and Jalili (2016), the most memory efficient value for chunk size is √ k.n because this value for chunk size generates a set of intermediate centers with size k.n.That is to say, the chunk size should not be set to value greater than √ k.n.A smaller chunk size can yield to better quality since smaller chunk size produces more intermediate centers which represent the input data set.Hence, all experiments described in Section 5, assume that the chunk size is √ k.n.

Tuning the pruning heuristic
The pruning heuristic α% can be set between 1 to 100%.A small value of this parameter reduces significantly computational time since most of distance computations will be ignored leading to a small loss of clustering quality.Alternatively, setting the pruning heuristic to a large value does not reduce the high computational time with leading approximately the same partitioning of k-prototypes.The experimental results show that setting the pruning heuristic to 10% with respect to all of the pruning heuristics from 1 to 100% tested in this work gives a good result.Hence, we set the pruning heuristic to 10% to provide a good trade-off between efficiency and quality.

Tuning the time to start
As mentioned above, many of distance computations are redundant in k-prototypes method because data points usually stay in the same clusters after first iterations.When the pruning strategy starts from the first iteration, the proposed method may produces an inaccurate results.Otherwise when the pruning strategy starts from the last iteration, no many distance computations will be reduced.For this reason, the time to start the pruning strategy is extremely important.Hence, we start the pruning strategy from iteration 2 because the convergence speed of k-prototypes slows down substantially after iteration 2 in the sense that many data points remain in the same cluster.

Complexity analysis
A typical clustering algorithm has three types of complexities: time complexity, I/O complexity and space complexity.To give complexity analysis of AMRKP method, we use the following notations: n the number of data points, k the number of clusters, l the number of iterations, α% the pruning heuristic, s the chunk size and p the number of chunks.

The time complexity analysis
The KP+PS algorithm requires at each iteration computing distances between centers and sorting them as shown in Algorithm 2. This step can be estimated by Then, the KP+PS selects an α% centers and evaluates the triangle inequality property until the property is not satisfied or all centers in the subset of α% centers have been evaluated.Therefore, we can conclude that the KP+PS algorithm can reduce theoretically the time complexity of k-prototypes from O(n.k.l) to O((n.α%.k + k 3 ).l).As stated before, the time to start the pruning strategy is extremely important.Hence, the time complexity of KP+PS algorithm depends on the iteration from which the pruning strategy is started.In the best case, when the pruning strategy is started from the first iteration, the time complexity of KP+PS is O((n.α%.k +k 3 ).l).In the worst case, when KP+PS converges before the pruning strategy is started, then KP+PS falls back to k-prototypes, and the time complexity is O((n.k+ k 3 ).l).Therefore, we can conclude that the time complexity of KP+PS algorithm is bounded between O((n.α%.k + k 3 ).l)and O((n.k + k 3 )l).
The KP+PS algorithm is applied twice: in the map phase and the reduce phases.In the map phase, each chunk involves running the KP+PS algorithm on that chunk.Therefore, the map phase takes O(n/p.α%.k + k 3 ).l)time.In the reduce phase, the KP+PS algorithm must be executed on the set of intermediate centers which has k.n/s data points.Hence, the reduce phase needs O((n/s.α%.k + k 3 ).l)time.Given that k.n/s << n/p, the overall time complexity of the proposed method is O(n/p.α%.k + k 3 ).l+ (k.n/s.α%.k + k 3 ).l)∼ = O(n/p.α%.k + k 3 ).l).

The I/O complexity analysis
The proposed method reads the input data set just one time from the file system in the map phase.Therefore, the I/O complexity of the map phase is O(n/p).The I/O complexity of the reduce phase is O(k.n/s).As a result, the overall I/O complexity of the proposed method is O(n/p + k.n/s).If s is fixed to √ k.n, the I/O complexity will be O(n/p + √ k.n).

The space complexity analysis
The space complexity of AMRKP depends on the chunk size and the number of chunks that can be processed in the map phase.

Methodology
In order to evaluate the efficiency of AMRKP method, we performed experiments on both simulated and real data sets.We tried in this section to figure out three points.(i) How much is the efficiency of AMRKP method when applied to mixed large scale data compared to existing methods?(ii) How the pruning strategy can reduce the number of unnecessary distance computations?(iii) How the MapReduce framework can enhance the scalability of the proposed method when dealing with mixed large scale data?
We split experiments into three major subsections.First, we compare the performance of the proposed method versus the following existing methods: conventional k-prototypes, described in Algorithm 1, denoted by KP and the MapReduce-based k-prototypes (Ben Haj Kacem et al. 2015) denoted by MRKP.Then, we study the pruning strategy performance to reduce the number of distance computations between clusters and data points.Finally, we evaluate the MapReduce performance by analyzing the scalability of the proposed method.

Environment and data sets
The experiments are performed on a Hadoop cluster running the latest stable version of Hadoop 2.7.1.The Hadoop cluster consists of 6 machines.Each machine has 1-core 2.30 GHz CPU E5400 and 1GB of memory.The operating system of each machine is Ubuntu 14.10 server 64bit.We conducted the experiments on the following data sets: -Simulated data set: four series of mixed large data sets are generated.The data sets range from 100 millions to 400 millions data points.Each data point is described using 5 numeric and 5 categorical attributes.The numeric values are generated with gaussian distribution.The mean is 350 and the sigma is 100.The categorical values are generated using the data generator developed in. 1 In order to simplify the names of the simulated data sets, we will use the notations Sim100M, Sim200M, Sim300M and Sim400M to denote a simulated data set containing 100, 200, 300 and 400 millions data points respectively.-KDD Cup data set (KDD): is a real data set which consists of normal and attack connections simulated in a military network environment.The KDD data set contains about 5 millions connections.Each connection is described using 33 numeric and 3 categorical attributes.The clustering process for this data set detects type of attacks among all connections.This data set was obtained from UCI machine learning repository.2 -Poker data set (Poker): is a real data set which is an example of a hand consisting of five playing cards drawn from a standard deck of 52 cards.The Poker data set contains about 1 millions data points.Each data point is described using 5 numeric attributes and 5 categorical attributes.The clustering process for this data set detects the hand situations.This data set was obtained from UCI machine learning repository. 3Statistics of these data sets are summarized in Table 1.

Evaluation measures
In order to evaluate the quality of the proposed method, we use Sum Squared Error (SSE) (Xu and Wunsch 2010).It is one of the most common partitional clustering criteria which aims to measure the squared errors between each data point and the cluster center to which the data point belongs to.SSE can be defined by: where x i the data point and c j the cluster center.
In order to evaluate the ability of the proposed method to scale with large data sets, we use in our experiments the Speedup measure (Xu et al. 2002).It measures the ability of the designed parallel method to scale well when the number of machines increases and the size of data is fix.This measure is calculated as follows: where T 1 the running time of processing data on 1 machine and T m the running time of processing data on m machines in the used cluster.
To simplify the discussion of the experimental results in Tables 2, 3, 4 and 5, we will use the following conventions.Let ψ denotes either KP or MRKP.Let T , D and S denote respectively the running time, the distance computations and the quality of the clustering result in terms of SSE.Let β denotes either T , D or S. The enhancement of β AMRKP (new algorithm) with respect to β ψ (original algorithm) in percentage defined by: For example, the enhancement of the running time of AMRKP with respect to the running time of k-prototypes is defined by: where β = T and ψ = KP.It is important to note that as defined in ( 11), a more negative value of β implies a greater enhancement.

Comparison of the performance of AMRKP versus existing methods
We compare in this section the performance of the proposed method versus existing methods.The results are reported in Table 2.As the results show, AMRKP method always finishes several times faster than existing methods.For example, Table 2 shows that AMRKP method (k = 10 clusters) on Poker data set can reduce the running time by 88.62%  and by 59.32% compared to k-prototypes and MRKP respectively.In all of the data sets, more than 95% of the running time was spent in the map phase and this shows that AMRKP method is truly one pass.In addition, obtained results report that the proposed method converges to nearly same results of the conventional k-prototypes which allows to maintain a good quality of partitioning.

Pruning strategy performance
We evaluate in this section the performance of the pruning strategy to reduce the number of redundant distance computations.The results are reported in Table 3.As the results show, the proposed method reduces the number of distance computations over k-prototypes on both simulated and real data sets.We must also mention that this reduction becomes more significant with the increase of k.For example, the number of distance computations is reduced by 35.11% when k = 10 and by 81.65% when k =100 on Poker data set.
In another experiment we investigated the impact of pruning heuristic α% on the performance of the proposed method compared to the conventional k-prototypes.For this purpose, we run AMRKP with different pruning heuristics from 1 to 100% on real data sets with k = 100.The results are reported in Table 4.As shown in Table 4, when the pruning heuristic is fixed to a small value, many distance computations are reduced with small loss of quality.For example, when the pruning heuristic is 10%, the pruning strategy can reduce the number of distance computations of k-prototypes by 81.65% on Poker data set.But, when the pruning heuristic is fixed to a large value, a small number of distance computations are reduced while maintaining the clustering quality.For example, when the pruning heuristic is 80%, the pruning strategy can reduce the number of distance computations of k-prototypes by 59.20% on Poker data set.
Then, we investigated the impact of the time to start the pruning strategy on the performance of the proposed method compared to the conventional k-prototypes.For this purpose, we run AMRKP with different pruning'starting times from iteration 1 to iteration 10 on real data sets with k = 100.The results are reported in Table 5.As shown in Table 5, when the pruning strategy starts from the first iteration, AMRKP leads to significant reduction of distance computations and this may decrease the clustering quality.For example, when the pruning strategy starts from iteration 1, the AMRKP can reduce the number of distance computations of k-prototypes by 81.11% on Poker data set.On the other hand, when the pruning strategy starts from the last iteration, AMRKP leads to small reduction of distance computations with small loss of quality.For example, when the pruning strategy starts

Scalability analysis
We first evaluate in this section the scalability of the proposed method when the number of machines increases.For investigating the speedup value, we used the Sim400M data set with k = 100.For computing speedup values, first we executed AMRKP method using just a single machine and then we added additional machines.Figure 2 illustrates the speedup results on Sim400M data set.The proposed method shows linear speedup as the number of machines increases because the MapReduce framework has linear speedup and each chunk can be processed independently.
Then, we evaluate the scalability of the proposed method when we increase the size of the data set.For investigating the influence of the size of data set, we used in this section the Sim100M, Sim200M, Sim300M and Sim400M data sets with k = 100.The results are plotted in Fig. 3.As the results show, the running time scales linearly, when size of data set

Conclusion
In order to deal with the issue of clustering mixed large scale data, we have proposed a new one-pass accelerated MapReduce-based k-prototypes clustering method.The proposed method reads and writes data only once which reduces largely the I/O operations like disk I/O and.Furthermore, the proposed method is based on a pruning strategy to accelerate the clustering process by reducing the redundant distance computations between cluster centers and data points.Experiments on huge simulated and real data sets have showed the efficiency of AMRKP to deal with mixed large scale data compared to existing methods.
The proposed method performs several iterations to converge to the optimal local solution.The number of iterations increases the running time while each iteration is time consuming.A good initialisation of the proposed method may improve both running time and clustering quality.An exciting direction for future works is to investigate the use of scalable initialisation techniques in order to reduce the number of iterations and then may be the improvement of the scalability of AMRKP method.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/),which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Fig. 2
Fig. 2 Speedup of AMRKP as the number of machines increases

Fig. 3
Fig. 3 Performance of AMRKP as the size of data set increases The map phase is required to keep p chunks in the memory.Hence, the space complexity of the map phase is O(p.s).The reduce phase needs to store k.n/s intermediate centers in the memory.Thus, the space complexity of the reduce phase is O(k.n/s).As a result, the overall space complexity of the proposed method is evaluated by O(p.s + k.n/s).

Table 1
Summary of the data sets

Table 3
Comparison

Table 5
The impact of the time to start on the performance of AMRKP