# Human-Touch-Inspired Material Recognition for Robotic Tactile Sensing
## 3 Methodology
### Classifier Configuration  
After the data collection and feature extraction, the dimensionality of each sample dropped from 193,600 to 11. Using the feature vectors, seven classifiers were selected to test the accuracies of two different recognition problems. The first recognition is property recognition. In this recognition, the materials are classified into four categories based on compliance and texture, and the categories are soft-rough, soft-smooth, rigid-rough, and rigid-smooth. The second recognition is material recognition. In this recognition, the specific materials are recognized. The seven classifiers are Linear Support Vector Machine (Linear SVM), Radial Basis Function Support Vector Machine (RBF-SVM), k-Nearest Neighbor (kNN), Linear Discriminant Analysis (LDA), Naive Bayes (NB), Random Forest (RF), and Multi-Layer Perceptron (MLP). Additionally, these classifiers can also be used to validate the effectiveness and robustness of the tactile data and feature extraction, and the most accurate classifier can be selected for material recognition. The description and parameters of the classifiers were listed as follows. Linear Support Vector Machine (Linear SVM) and Radial Basis Function Support Vector Machine (RBF SVM) are supervised classifiers based on the SVM theory. The theory maximizes the margin for two linearly separable classes by means of a suitable hyperplane to distinguish a set of inputs. The standard SVM is commonly used for binary classification, although it has been developed to enable multi-classification. Linear SVM uses linear kernel function (KF) as the kernel to map the data from the original space to a higher-dimensional space, which SVM requires, while RBF-SVM adopts the radial basis function as the kernel. The linear kernel function is given by Equation (3), and the radial basis function is given by Equation (4). \[x\left(\mathbf{x}_{i},\mathbf{x}_{j}\right)=\mathbf{x}_{i}^{T}\mathbf{x}_{j} \tag{3}\]  
\[x\left(\mathbf{x}_{i},\mathbf{x}_{j}\right)=exp\left(-\frac{\left\|\mathbf{x}_{i}-\mathbf{x}_ {j}\right\|^{2}}{2\sigma^{2}}\right) \tag{4}\]  
For Linear SVM, the L2 function was chosen as the penalty, since L2-SVM is differentiable and imposes a bigger (quadratic vs. linear) loss for points that violate the margin [35]. Besides, the squared hinge loss was used, because it is differentiable and suitable for maximum-margin classification [36]. Except for these, Linear SVM and RBF-SVM share the same key parameter C, and the parameter C is set to 1 to avoid the unwanted over-fitting. The k-Nearest Neighbor (kNN) method is a supervised classifier based on lazy learning. The kNN method is non-parametric, as it simply assigns the object to the class that is most common among its k nearest neighbors, following a majority vote. In this study, the Euclidean distances among the samples were calculated, and all the k nearest neighbors were weighted equally. Furthermore, the key parameter k was evaluated in a range from 1 to 15 to acquire the maximum accuracy. The k value that proved to be most effective for property recognition was 5, while the value became 10 for material recognition. Linear Discriminant Analysis (LDA) is a classical linear learning method that is capable of binary or multi-class classification. LDA maps all objects to a decision boundary, and by optimizing the coefficients the boundary, it clusters objects belonging to the same class compactly, while segregating different classes separately [37]. Therefore, LDA aims to maximize the generalized Rayleigh quotient \(J\) of within-class scatter matrix \(\mathsf{S}_{w}\) and between-class scatter matrix \(\mathsf{S}_{b}\), and it can be expressed as Equation (5). \[J=\frac{\mathbf{w}^{T}\mathsf{S}_{b}\mathbf{w}}{\mathbf{w}^{T}\mathsf{S}_{w}\mathbf{w}} \tag{5}\]  
where \(\mathbf{w}\) is the coefficient vector of the decision boundary. In this study, the \(\mathbf{w}\) was calculated by singular value decomposition. Naive Bayes (NB) is a supervised learning method based on the Bayes' theorem.