# Multigrades Classification Model of Magnesite Ore Based on SAE and ELM

Authors: Yachun Mao; Dong Xiao; Jinfu Cheng; Defu Che; Batuan Le; Liang Song; Xiaobo Liu
Journal: Journal of Sensors
 (2017)

---

## Abstract

Magnesite is an important raw material for extracting magnesium metal and magnesium compound; how precise its grade classification exerts great influence on the smelting process. Thus, it is increasingly important to determine fast and accurately the grade of magnesite. In this paper, a method based on stacked autoencoder (SAE) and extreme learning machine (ELM) was established for the classification model of magnesite. Stacked autoencoder (SAE) was firstly used to reduce the dimension of magnesite spectrum data and then neutral network model of extreme learning machine (ELM) was adopted to classify the data. Two improved extreme learning machine (ELM) models were employed for better classification, namely, accuracy extreme learning machine (AELM) and integrated accuracy (IELM) to build up the classification models. The grade classification through traditional methods such as chemical approaches, artificial methods, and BP neutral network model was compared to that in this paper. Results showed that the classification model of magnesite ore through stacked autoencoder (SAE) and extreme learning machine (ELM) is better in terms of speed and accuracy; thus, this paper provides a new way for the grade classification of magnesite ore.


---

## Body

## 1. Introduction

Magnesite is an important ore containing magnesium [1, 2]. It is not only an indispensable auxiliary refractory material [3–5] but an important material for extracting magnesium compounds and magnesium metal. According to the data released by United States Geological Survey (USGS) in 2015, the magnesite explored globally has reached 12 billion tons with a storage of 2.4 billion tons. Countries rich in the resource include Russia (650 million tons, accounting for 27% of the total) and China (500 million tons, accounting for 21% of the total). In recent years, with the industrial development, the demand for high-quality magnesite has been increasing. High-grade magnesite determines the quality of magnesium products, which raises the standard of its grade classification. Traditionally, there are two methods for the classification: the artificial classification which is fast but not so accurate and the chemical analysis which is more accurate but of high cost and needs more time [6]. As a result, how to fast and accurately determine the grade of magnesite is a problem which needs solving without delay, which is of great real significance for reducing cost and improving the efficiency of classification.Since near-infrared (NIR) reflectance spectroscopy [7–9] is quick, of low cost, and efficient, modeling based on NIR data has been widely applied into such fields as rock-mineral classification, grade identification, and food test. Contents and distribution of magnesium oxide, calcium oxide, ferric oxide, and aluminium oxide are the major determiners of the grade of magnesite ore. Yang et al. [10] studied the mineralogical properties of lateritic nickel ores from different places by X-ray diffraction and Fourier transform infrared spectroscopy. Dalm et al. [11] proposed the use of near-infrared sensors in porphyry copper deposits. Xu et al. [12] studied the flotation of chalcopyrite by infrared spectroscopy. Liu et al. [13] discussed the use of small molecule inhibitors in iron ore flotation tailings reelection.The collected NIR magnesite ore raw data is 973-high-dimensional data, which will increase the time of the algorithm model and reduce the accuracy of the model. Meanwhile the data of chemical factors which are normally contained in the NIR data did not influence the grade classification. Consequently, it is necessary to reduce the original data of the NIR original data before building the algorithm model.That is why the dimension of these data should be reduced. Dimensionality reduction is one of the ways to deal with high-dimensional data [14]. Bellman [15] put forward in 1961 the concept of “curse of dimensionality” which means data in higher dimension will lead to exponential increase of sample size, analysis, complexity in data processing, and cost. Traditional methods of reducing dimension fall in linear and nonlinear ones. The former includes principal component analysis (PCA) [16–18], independent component analysis (ICA) [19–22], and factor analysis and this kind of method is satisfying only for high-dimensional data with linear structure but not for data with nonlinear structure. Autoencoder in deep learning [23–26] is a new nonlinear dimension reduction method. It is an algorithm without monitoring and works to reduce the dimension and draw the features of data through the 3-layered neutral network and seeks for the internal feature structure of data or the encoding modes of data through self-learning.We have discussed that magnesite ore can be divided into two types of which are super and nonspecial grade [27]. But the actual application requirements often need to get into more types of magnesite; two kinds of classification methods in accuracy cannot meet the requirements. Therefore, we carried out a thorough study. First, we collected more grades of magnesite samples and carried out chemical tests and obtained accurate test results. Then they are divided into six categories, including “top grade, first grade, second grade, third grade, fourth grade, waste one.” In this paper, the near-infrared (NIR) data of magnesite ore was used as the data source and a modeling method of grade classification for magnesite ore based on original and improved ELM was proposed with the basis of SAE dimension reduction. It is a new fast and accurate method for grade classification of magnesite ore.


## 2. Experiments

### 2.1. NIR Apparatus

SVC HR-1024 portable field spectrum from Spectra Vista (US) was used to serve as the near-infrared spectrometer. Its spectral range was 350–2500 nm, internal memory was 500 scans, weight was 3 kg, port numbers were 1024, spectral resolution (FWHM ≦ 8.5 nm) was 1000–1850 nm, and the minimum integral time was 1 ms.


### 2.2. Material Source and Collection of Spectrum Data

The 633 magnesite samples were from Dashiqiao Magnesite Mine in Liaoning Province, China. The spatial distribution of the ore body is controlled by the ore-controlling factors (such as tectonics, magmatic activity, stratigraphy, geochemical factors, and metamorphic factors) when the ore body is formed. As Figure1 shows, the magnesite body formation is controlled by ore body and surrounding rock associated with it. In different areas of the contact zone formed different thickness and grades of ore body. The magnesite samples in this paper are taken from the four regions in Figure 1. These samples were sliced firstly.Figure 1
Magnesite ore body.Temperature and humidity have some influence on the acquisition of spectral data. We have done a series of experimental verification. The same magnesite sample (third grade) was tested at different times, different temperatures, and humidity. And it is ensured that the test temperature is within the normal working range of the instrument. Temperature, humidity, and solar elevation angle are as shown in Table1; the spectral curve is shown in Figure 2. The results show that the temperature and humidity have little effect on the spectral test results.Table 1
Spectrum test time and corresponding temperature and humidity.
Testing time
Solar elevation angle
Temperature (°C)
Humidity (% rh)
10:48
61°15′
23.9
18.8
11:48
63°15′
27.8
14.3
12:48
59°50′
31.2
12.8Figure 2
Different temperature and humidity corresponding to the spectral curve.The observation was done before sunset on sunny day without much cloud on open air. The scanning time is 1 s/time and the probe is 300 mm far away from the surface of magnesite ore and perpendicular to the upper surface. To reduce the radiation quantity on spectrum test, the experimenters are not supposed to walk about or be dressed in dark. The two surfaces were tested for 3 times through SVC HR-1024 and the average value was used as the spectrum data. The spectral images of some samples are shown in Figure3.Figure 3
The spectral images of part samples.


### 2.3. Sample Grade Determination

Liaoning Dashiqiao magnesite is an important source of magnesium in China, which has the characteristics of large reserves, thick layer, and shallow burial. After the spectrum test of 633 samples, contents of minerals in each sample were measured through chemical method. The samples were decomposed by hydrochloric acid, nitric acid, hydrofluoric acid, and perchloric acid before removing by HMT-copper the elements interfering the measurement including aluminium, iron, copper, zinc, and manganese; and then contents of calcium and magnesium were measured by EDTA standard solution complexometry. Industrial indicators of magnesite ore show that its grade classification is mainly determined by the contents of magnesium oxide, calcium oxide, and silicon dioxide. The physical and chemical test results of magnesite samples are presented in Table2.Table 2
Part of the physical and chemical test results of magnesite samples.
Number
Grade
Sample
Chemical composition%
IgL
SiO2
CaO
MgO
Fe2O3
AL2O3
1
Top grade
Magnesium stone
51.79
0.17
0.32
47.41
0.25
0.06
2
Top grade
Magnesium stone
51.73
0.14
0.42
47.39
0.27
0.05
3
First grade
Magnesium stone
51.51
0.66
0.34
47.28
0.16
0.05
4
First grade
Magnesium stone
51.54
0.69
0.25
47.23
0.24
0.05
5
Second grade
Magnesium stone
51.02
1.01
0.81
46.93
0.18
0.05
6
Second grade
Magnesium stone
51.10
1.40
0.59
46.67
0.19
0.05
7
Third grade
Magnesium stone
48.83
4.16
0.83
44.65
2.07
0.08
8
Third grade
Magnesium stone
46.81
8.46
1.12
43.23
0.30
0.08
9
Fourth grade
Magnesium stone
50.03
1.49
3.52
44.75
0.16
0.05
10
Waste ore
Magnesium stone
49.55
3.57
0.48
46.05
0.30
0.05According to the industrial indicators and chemical analysis results, the grades of 633 samples are 104 top grade, 109 first grade, 108 second grade, 110 third grade, 102 fourth grade, and 100 waste ores.


### 2.4. Autoencoder (AE) Network and Structure Principle

Autoencoder (AE) network is used to reduce the dimension of data and extract the features of data through the 3-layered neutral network. It can seek for the internal feature structure of data or encoding mode of data through self-learning. Its structure is shown in Figure4.Figure 4
Autoencoder structure.Autoencoder tries learning an identity functionhw,b(x)≈x and the pretraining stage in the encoding network can be divided into two steps: encoding and decoding. Layer 1 and Layer 2 belong to the encoding process where a function mapping g· will be defined to transform the input data x into u(1)u=gW1x+b0,where W and b are the weight and bias from the input layer to the hidden layer; W is a d×d′-dimensional matrix of weight while b is a d′-dimensional bias vector. Function g(·) is a nonlinear mapping.From Layer 2 to Layer 3 is the decoding.u is restructured to hw,bx through g(·)(2)hw,bx=gW2u+b1.Parameters ofW1, W2, b0, and b1 in autoencoding model are optimized by minimizing the mean reconstruction error. Mean reconstruction error can be defined in many ways but Formula (3) was adopted in this paper. (3)Lx,hW,bx=x-hW,bx2.Gradient Descent and Backpropagation Algorithm (BP) were used for the iteration ofW and of b in order to learn the optimal in-depth autoencoder network. There are m samples in the fixed set x1,y1,…,xm,ym. If the nodes of hidden layer are assumed smaller than m, an input compression expression will be obtained. The overall cost function can be defined as(4)JW,b=1m∑i=1mJW,b;xi,yi+λ2∑l=1nl-1∑i=1sl∑j=1sl+1Wjil2=1m∑i=1m12hW,bxi-yi2+λ2∑l=1nl-1∑i=1sl∑j=1sl+1Wjil2.The first termJ(W,b) is a term of mean square error while the second one is a regularized term. λ is the parameter of weight decay for narrowing down the range of weight to prevent overfitting. nl is the number of network layers. Wjil is the link parameter between j in Layer l and i in Layer l+1; bi(l) is the error term of i in Layer l+1. If the nodes in hidden layer s are larger than m, results of sparse coding will be worked out after adding some sparse restriction conditions, when the overall cost function is (5)JsparseW,b=JW,b+β∑j=1s2KLρ∥ρ^j.KLρ∥ρ^j=ρlog⁡ρ/ρ^j+1-ρlog⁡1-ρ/1-ρ^j is the relative entropy between two Bernoulli random variables with ρ and ρ^j as the mean value. Each iteration in Gradient Descent can renew W and b according to the following formulas: (6)Wijl=Wijl-α∂∂WijlJW,b,bil=bil-α∂∂bilJW,b,where α is the learning rate.


### 2.5. Basic Principle of Extreme Learning Machine (ELM)

ELM [28–30] is an algorithm through optimizing parameters of traditional neutral network through replacing iteration by solving linear equation set. Compared with traditional learning algorithms, ELM get rid of the repeated iterations, so it is faster and more competent in generalization [31].For any givenN samples xi,ti, where there are xi=xi1,xi2,…,xinT∈Rn and ti=ti1,ti2,…,timT∈Rm, stand for feedforward neutral network in single hidden layer with L nodes. Just as (1) shows, (7)fLx=∑i=1LβiGai,bi,xx∈R,ai∈Rn,βi∈Rm. Gai,bi,x refers to the relationship between node i and x. gxR→R, and there is (8)Gai,bi,x=gai·x+bi,bi∈R,where ai=ai1,ai2,…,ainT∈Rn is the input weight vector from the input layer to node i in hidden layer; bi is the threshold value of node i; βi=βi1,βi2,…,βimT is the output weight vector from node i to the output layer.TheN samples xi,ti∈Rn×Rm, xi∈Rn and ti∈Rm, were selected. And then Formula (1) can be simplified as (9)Hβ=T.H is the output matrix in hidden layer.L has no fixed formula and L the number of nodes in the hidden layer is selected accordingly in the experiment. 20 is the best option in this paper. ai and bi are valued randomly in the training of model.β can be expressed in Form. (4) as follows:(10)β^=H†T.H† is the generalized inverse expression of H.


### 2.6. Application of SAE and ELM in Model

From the autoencoder (AE) algorithm, we know that model’s output is equal to the input. The data dimension is reduced by controlling the number of hidden layer nodes less than the number of input nodes. SAE is to build multiple AE models to reduce the original data. SAE model’s parameters include the number of AE and the number of hidden nodes in each AE. The original spectral data is 633 × 973-high-dimensional data. In this paper, SAE constructs two AE models to achieve the purpose of reducing the original spectral data dimension; while the ELM is a single hidden layer feedforward neural network, the parameters we need to select are the number of hidden layer nodes, and we choose the hidden layer nodes through continuous testing which achieved good results in this paper.


### 2.7. Procedures of Classifying the Grade of Magnesite

NIR information of magnesite was collected through the spectrometer. These data need compression by SAE because of the high dimension and noise. And the data were classified through ELM to identify the magnesite: top grade and others. The procedures are displayed in Figure5.Figure 5
Grade classification procedure based on SAE and ELM.ELM in grade classification of magnesite can be concluded to 3 steps:(1)
Firstly, set the training setN=(xi,ti)∣xi∈Rn,ti∈Rm,i=1,…,N to activate gx and number of nodes in hidden layer L. And the parameter of L will be generated randomly: ai,bi,i=1,…,L.(2)
Secondly, the output matrixH in hidden layer is to be calculated.(3)
Finally, the output weightβ is to be calculated: β=H†T.


## 2.1. NIR Apparatus

SVC HR-1024 portable field spectrum from Spectra Vista (US) was used to serve as the near-infrared spectrometer. Its spectral range was 350–2500 nm, internal memory was 500 scans, weight was 3 kg, port numbers were 1024, spectral resolution (FWHM ≦ 8.5 nm) was 1000–1850 nm, and the minimum integral time was 1 ms.


## 2.2. Material Source and Collection of Spectrum Data

The 633 magnesite samples were from Dashiqiao Magnesite Mine in Liaoning Province, China. The spatial distribution of the ore body is controlled by the ore-controlling factors (such as tectonics, magmatic activity, stratigraphy, geochemical factors, and metamorphic factors) when the ore body is formed. As Figure1 shows, the magnesite body formation is controlled by ore body and surrounding rock associated with it. In different areas of the contact zone formed different thickness and grades of ore body. The magnesite samples in this paper are taken from the four regions in Figure 1. These samples were sliced firstly.Figure 1
Magnesite ore body.Temperature and humidity have some influence on the acquisition of spectral data. We have done a series of experimental verification. The same magnesite sample (third grade) was tested at different times, different temperatures, and humidity. And it is ensured that the test temperature is within the normal working range of the instrument. Temperature, humidity, and solar elevation angle are as shown in Table1; the spectral curve is shown in Figure 2. The results show that the temperature and humidity have little effect on the spectral test results.Table 1
Spectrum test time and corresponding temperature and humidity.
Testing time
Solar elevation angle
Temperature (°C)
Humidity (% rh)
10:48
61°15′
23.9
18.8
11:48
63°15′
27.8
14.3
12:48
59°50′
31.2
12.8Figure 2
Different temperature and humidity corresponding to the spectral curve.The observation was done before sunset on sunny day without much cloud on open air. The scanning time is 1 s/time and the probe is 300 mm far away from the surface of magnesite ore and perpendicular to the upper surface. To reduce the radiation quantity on spectrum test, the experimenters are not supposed to walk about or be dressed in dark. The two surfaces were tested for 3 times through SVC HR-1024 and the average value was used as the spectrum data. The spectral images of some samples are shown in Figure3.Figure 3
The spectral images of part samples.


## 2.3. Sample Grade Determination

Liaoning Dashiqiao magnesite is an important source of magnesium in China, which has the characteristics of large reserves, thick layer, and shallow burial. After the spectrum test of 633 samples, contents of minerals in each sample were measured through chemical method. The samples were decomposed by hydrochloric acid, nitric acid, hydrofluoric acid, and perchloric acid before removing by HMT-copper the elements interfering the measurement including aluminium, iron, copper, zinc, and manganese; and then contents of calcium and magnesium were measured by EDTA standard solution complexometry. Industrial indicators of magnesite ore show that its grade classification is mainly determined by the contents of magnesium oxide, calcium oxide, and silicon dioxide. The physical and chemical test results of magnesite samples are presented in Table2.Table 2
Part of the physical and chemical test results of magnesite samples.
Number
Grade
Sample
Chemical composition%
IgL
SiO2
CaO
MgO
Fe2O3
AL2O3
1
Top grade
Magnesium stone
51.79
0.17
0.32
47.41
0.25
0.06
2
Top grade
Magnesium stone
51.73
0.14
0.42
47.39
0.27
0.05
3
First grade
Magnesium stone
51.51
0.66
0.34
47.28
0.16
0.05
4
First grade
Magnesium stone
51.54
0.69
0.25
47.23
0.24
0.05
5
Second grade
Magnesium stone
51.02
1.01
0.81
46.93
0.18
0.05
6
Second grade
Magnesium stone
51.10
1.40
0.59
46.67
0.19
0.05
7
Third grade
Magnesium stone
48.83
4.16
0.83
44.65
2.07
0.08
8
Third grade
Magnesium stone
46.81
8.46
1.12
43.23
0.30
0.08
9
Fourth grade
Magnesium stone
50.03
1.49
3.52
44.75
0.16
0.05
10
Waste ore
Magnesium stone
49.55
3.57
0.48
46.05
0.30
0.05According to the industrial indicators and chemical analysis results, the grades of 633 samples are 104 top grade, 109 first grade, 108 second grade, 110 third grade, 102 fourth grade, and 100 waste ores.


## 2.4. Autoencoder (AE) Network and Structure Principle

Autoencoder (AE) network is used to reduce the dimension of data and extract the features of data through the 3-layered neutral network. It can seek for the internal feature structure of data or encoding mode of data through self-learning. Its structure is shown in Figure4.Figure 4
Autoencoder structure.Autoencoder tries learning an identity functionhw,b(x)≈x and the pretraining stage in the encoding network can be divided into two steps: encoding and decoding. Layer 1 and Layer 2 belong to the encoding process where a function mapping g· will be defined to transform the input data x into u(1)u=gW1x+b0,where W and b are the weight and bias from the input layer to the hidden layer; W is a d×d′-dimensional matrix of weight while b is a d′-dimensional bias vector. Function g(·) is a nonlinear mapping.From Layer 2 to Layer 3 is the decoding.u is restructured to hw,bx through g(·)(2)hw,bx=gW2u+b1.Parameters ofW1, W2, b0, and b1 in autoencoding model are optimized by minimizing the mean reconstruction error. Mean reconstruction error can be defined in many ways but Formula (3) was adopted in this paper. (3)Lx,hW,bx=x-hW,bx2.Gradient Descent and Backpropagation Algorithm (BP) were used for the iteration ofW and of b in order to learn the optimal in-depth autoencoder network. There are m samples in the fixed set x1,y1,…,xm,ym. If the nodes of hidden layer are assumed smaller than m, an input compression expression will be obtained. The overall cost function can be defined as(4)JW,b=1m∑i=1mJW,b;xi,yi+λ2∑l=1nl-1∑i=1sl∑j=1sl+1Wjil2=1m∑i=1m12hW,bxi-yi2+λ2∑l=1nl-1∑i=1sl∑j=1sl+1Wjil2.The first termJ(W,b) is a term of mean square error while the second one is a regularized term. λ is the parameter of weight decay for narrowing down the range of weight to prevent overfitting. nl is the number of network layers. Wjil is the link parameter between j in Layer l and i in Layer l+1; bi(l) is the error term of i in Layer l+1. If the nodes in hidden layer s are larger than m, results of sparse coding will be worked out after adding some sparse restriction conditions, when the overall cost function is (5)JsparseW,b=JW,b+β∑j=1s2KLρ∥ρ^j.KLρ∥ρ^j=ρlog⁡ρ/ρ^j+1-ρlog⁡1-ρ/1-ρ^j is the relative entropy between two Bernoulli random variables with ρ and ρ^j as the mean value. Each iteration in Gradient Descent can renew W and b according to the following formulas: (6)Wijl=Wijl-α∂∂WijlJW,b,bil=bil-α∂∂bilJW,b,where α is the learning rate.


## 2.5. Basic Principle of Extreme Learning Machine (ELM)

ELM [28–30] is an algorithm through optimizing parameters of traditional neutral network through replacing iteration by solving linear equation set. Compared with traditional learning algorithms, ELM get rid of the repeated iterations, so it is faster and more competent in generalization [31].For any givenN samples xi,ti, where there are xi=xi1,xi2,…,xinT∈Rn and ti=ti1,ti2,…,timT∈Rm, stand for feedforward neutral network in single hidden layer with L nodes. Just as (1) shows, (7)fLx=∑i=1LβiGai,bi,xx∈R,ai∈Rn,βi∈Rm. Gai,bi,x refers to the relationship between node i and x. gxR→R, and there is (8)Gai,bi,x=gai·x+bi,bi∈R,where ai=ai1,ai2,…,ainT∈Rn is the input weight vector from the input layer to node i in hidden layer; bi is the threshold value of node i; βi=βi1,βi2,…,βimT is the output weight vector from node i to the output layer.TheN samples xi,ti∈Rn×Rm, xi∈Rn and ti∈Rm, were selected. And then Formula (1) can be simplified as (9)Hβ=T.H is the output matrix in hidden layer.L has no fixed formula and L the number of nodes in the hidden layer is selected accordingly in the experiment. 20 is the best option in this paper. ai and bi are valued randomly in the training of model.β can be expressed in Form. (4) as follows:(10)β^=H†T.H† is the generalized inverse expression of H.


## 2.6. Application of SAE and ELM in Model

From the autoencoder (AE) algorithm, we know that model’s output is equal to the input. The data dimension is reduced by controlling the number of hidden layer nodes less than the number of input nodes. SAE is to build multiple AE models to reduce the original data. SAE model’s parameters include the number of AE and the number of hidden nodes in each AE. The original spectral data is 633 × 973-high-dimensional data. In this paper, SAE constructs two AE models to achieve the purpose of reducing the original spectral data dimension; while the ELM is a single hidden layer feedforward neural network, the parameters we need to select are the number of hidden layer nodes, and we choose the hidden layer nodes through continuous testing which achieved good results in this paper.


## 2.7. Procedures of Classifying the Grade of Magnesite

NIR information of magnesite was collected through the spectrometer. These data need compression by SAE because of the high dimension and noise. And the data were classified through ELM to identify the magnesite: top grade and others. The procedures are displayed in Figure5.Figure 5
Grade classification procedure based on SAE and ELM.ELM in grade classification of magnesite can be concluded to 3 steps:(1)
Firstly, set the training setN=(xi,ti)∣xi∈Rn,ti∈Rm,i=1,…,N to activate gx and number of nodes in hidden layer L. And the parameter of L will be generated randomly: ai,bi,i=1,…,L.(2)
Secondly, the output matrixH in hidden layer is to be calculated.(3)
Finally, the output weightβ is to be calculated: β=H†T.


## 3. Establishment of the Model

### 3.1. Dimension Reduction of Magnesite Ore NIR Data by SAE

With 633 samples in the experiment, the original spectral data collected is a 973-dimensional matrix. The redundancy of data makes the classification neutral network less accurate and consume longer time. The industrial grade of magnesite ore falls into 6 levels: top, first, second, third, fourth, and waste. The value of top, first, and second grade is well worth classifying. In this paper, SAE was used for the dimension reduction of pretreated spectral data. There are 2 layers of hidden layer, one of which contains 200 nodes and the other of which contains 100 nodes. So the original NIR data are supposed to reduce to 100 in the dimension reduction. SAE structure is displayed in Figure6.Figure 6
Structure of SAE.


### 3.2. Establishment and Improvement of ELM Model

The spectral data treated by SAE is 633 × 100 and the training set and test set are randomly selected from the samples. There are 437 training samples, including 72 top grade, 73 first grade, 72 second grade, 80 third grade, 72 fourth grade, and 70 waste ores. Parameters of grade classification by ELM include activation function and number of nodes in the hidden layer. The activation function in ELM mainly includes Sigmoid function, sin function, and hardlim function. Number of nodes in the hidden layer exerts great influence on the learning and information processing of the network: excessive number makes the network more complex, prolongs the learning time, and leads to overfitting while smaller number may constrain the learning and processing ability of the network. In reality, empirical formula is conventionally used to roughly determine a range of the number before selecting an optimal one through repeated experiments. The optimal number in this paper is 45. Output weight is worked out through Formula (10) which gives the only optimal solution. The output results and expected scatter profiles of training set and test set in ELM model are presented in Figures 7 and 8, respectively.Figure 7
Output results and expected scatter profiles of training set.Figure 8
Output results and expected scatter profiles of test set.Figures7 and 8 reveal that traditional ELM is not so effective in the grade classification. The input weight of ELM and the threshold value of hidden layer are valued randomly, so the output is not so stable and likely to result in local minimum and thus the accuracy rate is small. On account of this, an improved ELM—accuracy ELM—is put forward. The traditional ELM is recycled for 200 times and then the output of training sets is compared to find out and reserve the most accurate input value(s) and threshold value(s) of hidden layer, both of which will be used as the fixed parameters of ELM model. That means the accuracy ELM model for grade classification of magnesite ore is established. The predicted and expected output scatter profiles of accuracy ELM training set are presented in Figures 9 and 10, respectively.Figure 9
Accuracy ELM training set of predicted and expected output scatter profile.Figure 10
Accuracy ELM testing set of predicted and expected output scatter profile.


### 3.3. Integrated Accuracy ELM

The predicted results show obvious improvement. The accuracy ELM in each group corresponds to a group of parameters and there may be differences in the results, so it is not stable. To make it more stable, an integrated accuracy ELM is proposed. The number of integrated groups is the quantity of selected ELM models that we choose. Group 11 is selected in this paper and the integrated model outputs the most grades among the 11 single models, which can help improve the prediction accuracy. The quantitative relation between predicted value and expected value in results of experimental simulation and statistical simulations reveals that the integrated accuracy ELM model is superior in its stability and accuracy in the grade classification of magnesite ore. Comparisons between simulation results in this model and those of the real samples are presented in Tables3 and 4.Table 3
Confusion matrix structure of the integrated accuracy ELM training group output.
The expected training set
The predicted training set
Top grade
First grade
Second grade
Third grade
Fourth grade
Waste ore
Top grade
72
0
0
0
0
0
First grade
0
73
1
1
0
0
Second grade
0
0
71
0
0
0
Third grade
0
0
0
79
0
0
Fourth grade
0
0
0
0
72
0
Waste ore
0
0
0
0
0
70Table 4
Confusion matrix structure of the integrated accuracy ELM testing group output.
The expected training set
The predicted testing set
Top grade
First grade
Second grade
Third grade
Fourth grade
Waste ore
Top grade
32
0
0
0
0
0
First grade
0
36
2
0
0
0
Second grade
0
0
33
0
0
0
Third grade
0
0
1
30
0
0
Fourth grade
0
0
0
0
32
0
Waste ore
0
0
0
0
0
32


## 3.1. Dimension Reduction of Magnesite Ore NIR Data by SAE

With 633 samples in the experiment, the original spectral data collected is a 973-dimensional matrix. The redundancy of data makes the classification neutral network less accurate and consume longer time. The industrial grade of magnesite ore falls into 6 levels: top, first, second, third, fourth, and waste. The value of top, first, and second grade is well worth classifying. In this paper, SAE was used for the dimension reduction of pretreated spectral data. There are 2 layers of hidden layer, one of which contains 200 nodes and the other of which contains 100 nodes. So the original NIR data are supposed to reduce to 100 in the dimension reduction. SAE structure is displayed in Figure6.Figure 6
Structure of SAE.


## 3.2. Establishment and Improvement of ELM Model

The spectral data treated by SAE is 633 × 100 and the training set and test set are randomly selected from the samples. There are 437 training samples, including 72 top grade, 73 first grade, 72 second grade, 80 third grade, 72 fourth grade, and 70 waste ores. Parameters of grade classification by ELM include activation function and number of nodes in the hidden layer. The activation function in ELM mainly includes Sigmoid function, sin function, and hardlim function. Number of nodes in the hidden layer exerts great influence on the learning and information processing of the network: excessive number makes the network more complex, prolongs the learning time, and leads to overfitting while smaller number may constrain the learning and processing ability of the network. In reality, empirical formula is conventionally used to roughly determine a range of the number before selecting an optimal one through repeated experiments. The optimal number in this paper is 45. Output weight is worked out through Formula (10) which gives the only optimal solution. The output results and expected scatter profiles of training set and test set in ELM model are presented in Figures 7 and 8, respectively.Figure 7
Output results and expected scatter profiles of training set.Figure 8
Output results and expected scatter profiles of test set.Figures7 and 8 reveal that traditional ELM is not so effective in the grade classification. The input weight of ELM and the threshold value of hidden layer are valued randomly, so the output is not so stable and likely to result in local minimum and thus the accuracy rate is small. On account of this, an improved ELM—accuracy ELM—is put forward. The traditional ELM is recycled for 200 times and then the output of training sets is compared to find out and reserve the most accurate input value(s) and threshold value(s) of hidden layer, both of which will be used as the fixed parameters of ELM model. That means the accuracy ELM model for grade classification of magnesite ore is established. The predicted and expected output scatter profiles of accuracy ELM training set are presented in Figures 9 and 10, respectively.Figure 9
Accuracy ELM training set of predicted and expected output scatter profile.Figure 10
Accuracy ELM testing set of predicted and expected output scatter profile.


## 3.3. Integrated Accuracy ELM

The predicted results show obvious improvement. The accuracy ELM in each group corresponds to a group of parameters and there may be differences in the results, so it is not stable. To make it more stable, an integrated accuracy ELM is proposed. The number of integrated groups is the quantity of selected ELM models that we choose. Group 11 is selected in this paper and the integrated model outputs the most grades among the 11 single models, which can help improve the prediction accuracy. The quantitative relation between predicted value and expected value in results of experimental simulation and statistical simulations reveals that the integrated accuracy ELM model is superior in its stability and accuracy in the grade classification of magnesite ore. Comparisons between simulation results in this model and those of the real samples are presented in Tables3 and 4.Table 3
Confusion matrix structure of the integrated accuracy ELM training group output.
The expected training set
The predicted training set
Top grade
First grade
Second grade
Third grade
Fourth grade
Waste ore
Top grade
72
0
0
0
0
0
First grade
0
73
1
1
0
0
Second grade
0
0
71
0
0
0
Third grade
0
0
0
79
0
0
Fourth grade
0
0
0
0
72
0
Waste ore
0
0
0
0
0
70Table 4
Confusion matrix structure of the integrated accuracy ELM testing group output.
The expected training set
The predicted testing set
Top grade
First grade
Second grade
Third grade
Fourth grade
Waste ore
Top grade
32
0
0
0
0
0
First grade
0
36
2
0
0
0
Second grade
0
0
33
0
0
0
Third grade
0
0
1
30
0
0
Fourth grade
0
0
0
0
32
0
Waste ore
0
0
0
0
0
32


## 4. Results and Comparison

ELM, accuracy ELM, and integrated accuracy ELM classification models were established for the grades of magnesite ore. The simulation results are displayed in Table5.Table 5
The simulation results of various models of magnesite ore grade classification.
Model types
Training set accuracy rate
Testing set accuracy rate
Model time consuming
ELM (%)
84.897%
75.0%
0.3202 s
Accuracy ELM (%)
94.050%
85.204%
1.86 s
Integrated accuracy ELM (%)
99.542%
98.469%
59.7 sThis table shows the accuracy of each model in the grade classification. The training set of conventional ELM model is not so accurate; the accuracy ELM model is more precise, reaching above 85% but it is not so stable. Both the accuracy and stability of integrated accuracy ELM model have been greatly improved and its accuracy reaches 98%.Table6 is the comparison in cost and time in different ways including ELM model, BP, traditional artificial method, and chemical method.Table 6
Different ways of detecting chart.
Experiment object
Accuracy of magnesite
Identification time-consuming
Expenses
Traditional artificial method
65%
2.5 days
$105
Chemical test method
100%
18 days
$1744
BP
60%
2.5 hours
$27
ELM
98%
2.0 hours
$27This table presents that the traditional artificial method is not accurate enough though it is easy. Chemical medicine is needed in the chemical test method and the cost is about $1744, besides, some experimental apparatus and human cost will be above $435287, so this method is much more expensive. Comparatively, the investment on hardware devices including spectrometer and computer is no more than $43500. ELM is more accurate than BP, requiring less cost and shorter time. ELM is the most economical and accurate with considerable benefit.


## 5. Conclusion

In this paper, a new method of magnesite grade classification was put forward. Based on the nondestructive testing technology of NIR, the spectral data of magnesite ore was collected. And then, the dimension of these data was reduced with SAE. Finally, the models were established through ELM. Traditional ELM model is less accurate in the grade classification, because of which the accuracy ELM was proposed. To make up for the poor stability of accuracy ELM, the integrated accuracy ELM was proposed, which is superior to the two ELM models in terms of accuracy and stability. Its accuracy can reach as high as 98%. Compared with traditional methods of magnesite grade classification, integrated accuracy ELM has advantages in economic efficiency, accuracy, and rapidity; in addition, this method can achieve online testing of ores in large volume. Obviously, it is of great practical application value.



---

*Source: 9846181-2017-08-22.xml*