This module is a part of “Engine Carbon Brushes Replacement” project. The purpose of the module is a classification of the Cement Mill 12 engine start phases.
Trying to clustering the quality of the start phases was concluded, that is important to clusterize whole working periods because the start phase is a part working period and the difference between start phases is determined by the difference between work periods. It is better way to clusterize whole work period using start phase as one of the classifiers.
As classifiers of work periods were taken four parameters:
a) average current;
b) standard deviation of current;
c) duration of start phase;
d) period of time between previous and analyzed work period.
Before running classification algorithms let’s check whether there are any correlations between chosen classifiers.
There is no any correlation between classifiers.
Classification methods
Classification method will be chosen from hierarchical clustering “ward.D”, “ward.D2”, “single”, “complete”, “average”, “mcquitty”, “centroid” methods and K-Mean clustering method.
The best clustering method and the optimal number of clusters are evaluated by Calinski-Harabasz Index.
It is better to take as minimum quantity of groups as possible (no more than 4 or 5) but to see a general picture let’s research from 2 to 20 clusters. Results are shown in the chart.
(R- code is based on functions published on
https://github.com/ethen8181/machine-learning/blob/master/clustering_old/clustering/clustering_functions.R)
According to the chart, the best result brings K-Mean method divides data for 5 groups.
The biggest CH index k=5 of k-Mean line on the “CH-index” chart. On “wss” chart, the line of K-Meam represents smallest values and dramatic decline of wss changed by a relatively smooth decline on k=5.
Let’s represent the CH Index data in the matrix view:
## k ward.D ward.D2 single complete average mcquitty centroid kmeans
## 1 2 1070.62 1180.90 890.39 890.39 890.39 890.39 993.51 1394.05
## 2 3 1174.33 1354.59 494.69 708.01 708.01 708.01 538.62 1551.58
## 3 4 1251.73 1624.57 335.23 688.34 485.68 543.97 361.96 1832.46
## 4 5 1333.73 2090.37 252.20 526.49 514.63 417.03 275.67 2640.33
## 5 6 1199.54 2106.66 221.17 427.55 416.16 339.25 298.99 2570.98
## 6 7 1154.33 2221.77 187.62 360.08 348.71 286.07 365.36 2575.58
## 7 8 1982.09 2267.59 162.91 434.48 305.06 350.25 313.77 2515.20
## 8 9 1811.51 2351.41 187.61 383.01 271.05 568.12 276.03 2411.49
## 9 10 1921.65 2340.38 167.37 657.72 243.55 507.00 249.05 2276.71
## 10 11 1816.39 2274.84 158.32 650.20 222.23 516.30 225.10 2263.82
## 11 12 1753.38 2227.94 145.39 596.14 202.42 470.72 208.02 2174.55
## 12 13 1662.12 2181.05 133.89 1125.97 186.28 432.18 191.37 2569.57
## 13 14 1641.01 2149.05 125.38 1044.54 353.72 435.96 179.44 2507.69
## 14 15 1579.24 2109.53 116.59 978.54 362.33 411.90 166.92 2416.06
## 15 16 1688.33 2080.51 108.92 930.26 338.48 385.23 156.02 2409.29
## 16 17 1614.30 2060.04 111.48 875.60 317.65 362.39 146.64 2389.64
## 17 18 1540.96 2043.59 105.80 833.12 299.19 561.68 138.22 2369.98
## 18 19 1488.19 2029.16 100.47 788.73 282.91 540.13 130.87 2315.14
## 19 20 1885.30 2007.02 95.18 759.44 423.20 512.22 124.07 2264.00
It looks like the biggest value is k=5 of k-Mean method. Let’s scan the matrix in order to find the optimal clustering method and optimal number of clusters (the biggest value in the matrix):
bestMethod<-names(which.max(apply(CHIndex_Tab[-1],2,max)))
maxIndex<-max(CHIndex_Tab[bestMethod])
k<-CHIndex_Tab[CHIndex_Tab[bestMethod]==maxIndex,1]
print(paste("The optimal clustering method is ",bestMethod,". The optimal number of clusters is ",k,".",sep = ""))
## [1] "The optimal clustering method is kmeans. The optimal number of clusters is 5."
Let’s apply K-Mean clustering method with k=5. The algorithm divided all engine runnings into 5 clusters by following way:
By comparison information gain of all classifiers against clusters, we can see relative weight of all of them (classifiers ) in clustering:
## VarName weight
## 1 stdCurrent 0.5721363
## 2 avgCurrent 0.2696850
## 3 hoursFromPreviousRunning 0.1476887
## 4 startPhase 0.1335703
The most significant influence in clustering has average current, the less significant influence has start phase.
With the help of radar chart, let’s see distribution of chosen parameters between the groups.
Two major clusters “1” and “5” almost the same, except standard deviation of the current- cluster “1” is more stable than “5”.
Third big cluster “2” has relatively high standard deviation than clusters “1” and “5”.
The group “4” main difference is a significantly long start phase.
The smallest group “2” is different from others by a significant standard deviation of the current and long time interval from the previous running.
Cluster “3” has a long period from the previous running and has relatively low current.
Let’s see the average current in the groups compared with the average current of start phases of those groups.
The major difference between CM12 and the rest of the cement mills- the average current of the start phase is significantly lower than average current of the whole work period.
Now we have a two question:
a) Maybe some processes or events connected to the mill have had a temporary influence and belong to the specific time period and now have no more importance? b) Maybe the material type has an influence on groups?
Cluster “3” represents running without a material load. In other cases, it looks like, that material type has no significant influence on the group division.
There is no any connection between division by groups and special time period. All groups represented during the whole analyzed time period.
Here is the table of the percent presentation (by work hours) material types in groups:
##
## 1 2 3 4 5
## AM 40.75 9.33 1.00 6.04 20.92
## AMLS 1.09 0.50 0.19 0.08 1.17
## BLL 4.02 3.43 0.50 0.52 5.67
## empty 0.00 0.17 4.46 0.02 0.02
## NB 0.04 0.00 0.00 0.02 0.06
As already explained, the average current is the main factor of group division. The next chart shows the density of values of current within different types of material. The average current of groups is indicated by vertical black lines.
Cluster “4” includes the runnings with longest start phases, and cluster “2” includes the most unstable runnings.