# X-ray Diffraction Data Analysis by Machine Learning Methods--A Review
## 4 Applications of Machine Learning in XRD Data Analysis
### Lattice Analysis  
[PERSON] et al. [100] proposed a specialized learning engine for identifying the cubic structure of materials regardless of their composition. Their approach borrows from human gene regulation theory to conduct the training of a group of distributed neural networks, where each neural network is managed by the engine in a similar manner to how genes are regulated inside the human body. The application of this approach to the classification of cubic lattices showed an accuracy rate over 99% over a representative range of materials. \begin{table}
\begin{tabular}{c c c c c c} \hline  & **Dataset** & **CNN** & **KNN** & **RF** & **SVM** \\ \hline Synthetic & D1-trained & 94.36\% & 12.15\% & 56.82\% & 33.60\% \\ dataset & D2-trained & 96.47\% & 13.08\% & 63.62\% & 42.74\% \\ Real-world & D1-trained & 88.88\% & 24.44\% & 17.78\% & 13.33\% \\ dataset & D2-trained & 91.11\% & 22.22\% & 15.56\% & 13.33\% \\ \hline \end{tabular}
\end{table} 
Table 4: Phase identification test accuracy values for the CNN, KNN, RF, and SVM. Data are from Reference [98]. \begin{table}
\begin{tabular}{c c c c c} \hline  & **Dataset** & **ANN** & **KNN** & **RF** & **SVM** \\ \hline Synthetic & MSE & 0.004612 & 0.002507 & 0.003987 & 0.001809 \\ dataset & R\({}^{2}\) & 0.923253 & 0.956168 & 0.930789 & 0.968471 \\ Real-world & MSE & 0.008260 & 0.008035 & 0.006453 & 0.002423 \\ dataset & R\({}^{2}\) & 0.821816 & 0.860250 & 0.894196 & 0.958704 \\ \hline \end{tabular}
\end{table} 
Table 5: Phase-fraction regression of the MSE and R\({}^{2}\) values for the ANN, KNN, RF, and SVM. Data are from Reference [98]. Since the proposed method is also computationally efficient, it can potentially be used for partial automation of the complex XRD analysis task. The space group determination problem from powder XRD patterns was studied by [PERSON] et al. [101] employing a dense neural network method for the classification of crystal symmetry. The model was trained on theoretically computed XRD patterns and tested on both theoretical and experimental data. The authors report a space group classification accuracy on real experimental data of approximately 54%, with incorrectly classified structures often exhibiting close symmetry to the correct space group. The certainty of the predicted space group was ascertained using a softmax activation function for the output layer, which was chosen because it produces results that can be interpreted as a probability distribution. Notably, when uncertain predictions were dropped (i.e., those for which the highest softmax probability was less than 0.45), the classification accuracy for the remaining data (approximately half of the initial dataset) improved to about 82%. Thus, the method may be used to automatically characterize a subset of the data (for which the algorithm has arbitrarily high certainty), leaving the remaining diagrams to be processed manually. [PERSON] et al. [102] also approached crystal system and space group classification using ML models. Their most successful model, which exceeded 90% accuracy for crystal system classification, is built on an extremely randomized trees (ensemble) algorithm. The positions of the ten left-most peaks (low values of 20) in the XRD were included as part of the input to the model to mimic the process that human experts perform, while the decision tree model was chosen to obtain an interpretable model that would provide insight into the classification process. The model also performed space group classification, with an accuracy of 80% for the most likely candidate; when considering a list of the five top candidates, the accuracy increased to above 92% (probability that the list contains the correct space group). Despite the generally high accuracy, the model significantly underperformed on the triclinic crystal system, with an accuracy just below 50%; this reduced performance was attributed to a shortage of triclinic training data, suggesting that any ML-based approach would be affected by this issue. A report by [PERSON] et al.