# Cocrystal Prediction Using Machine Learning Models and Descriptors
## 2 Materials and Methods
### Methods  
There have been studies that trained machine learning models using molecular descriptors as features [16; 53], however such studies only fed the models with the descriptors without performing a crucial analysis of the molecular descriptors. In this work, we apply feature selection algorithms to measure importance of descriptors and use a found set of promising ones. The feature selection algorithms are supposed to select \(F_{S}\) features among the \(F_{ALL}\) features as depicted in the middle of Figure 1. We tried two feature selection \begin{table}
\begin{tabular}{c c c c} \hline
**Service** & **Compound 1** & **Compound 2** & **Label** \\ \hline \multirow{10}{*}{PubChem} & C1=CC(=CN=C1)C(=O)N & C1=CC=C(C(=C1)C(=O))[N+](=O)[O-] & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC(=CC(=C1)[N+](=O)[O-])C(=O) & 0 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC=C1C(=O))[N+](=O)[O-] & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC=C((=C1)C(=O))O & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC=C1C(=O))O(=O) & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC=C(=C1C(=O))(=O)F & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC=C1C(=O))F(=O) & 0 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC=C1C(=O))F & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC=CC(=C1C(=O))C(=O)N & 1 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC=C1)N(==O)O & 0 \\  & C1=CC(=CN=C1)C(=O)N & C1=CC(=CC=C1C(=O))N & 1 \\  & C1=CC(=CN=C1)C(=O)N & C0C1=CC=CC=CC=C1C(=O)O & 0 \\ \hline \end{tabular}
\end{table} 
Table 1: Sample of canonical SMILES strings by PubChem for each compound in a sample of raw data. Figure 2: Sample of raw data. algorithms: Recursive Feature Elimination (RFE) algorithm and K-best algorithm. The RFE algorithm is a wrapper-based algorithm that treats the feature selection as a search problem. It repeatedly removes unpromising features until desired number of features remains. We use an artificial neural network (ANN) as an estimator of the RFE algorithm. The K-best algorithm is a filter-based algorithm that selects potential features according to a particular function \(\sigma(f,c)\) where \(f\) and \(c\) are a feature and a label, respectively. We use a ANOVA F-value as the function \(\sigma\). Before passing the \(D\times F_{S}+1\) real-numbered matrix to machine learning models, we standardize the feature values. This process is, of course, performed using only training data; the mean \(\mu\) and standard deviation \(\sigma\) are computed only with the training data. We used scikit-learn ([[https://scikit-learn.org/stable/](https://scikit-learn.org/stable/)]([https://scikit-learn.org/stable/](https://scikit-learn.org/stable/))) to implement the standardization, and found that it is better than normalization (i.e., 0-1 scaling) for our data. Given the standardized matrix \(\mathbf{X}\in\mathbb{R}^{D\times F_{S}}\), the machine learning models are supposed to give labels \(\mathbf{y}\in\{0,1\}^{D}\). We have used several machine learning models such as artificial neural network (ANN), support vector machine (SVM) [54], random forest (RF) [55], and extreme gradient boost (XGB) [56]. The ANN is known to be effective in many research fields such as image analysis, natural language processing, and speech recognition; It is a deep learning model if it has a deep structure (i.e., multiple hidden layers). The SVM finds a decision boundary based on boundary instances (i.e., support vectors) and is known to be successful in many classification tasks. The RF and XGB are common ensemble approaches, but RF uses the bagging strategy while the XGB employs boosting strategy. We compared these widely-used models with experimental results. The total, the dataset \(D_{total}\) contains 1476 instances, of which 723 were unsuccessful, and 753 were successful, as shown in Table 2. Since the dataset is balanced, we performed 10-fold cross validation while maintaining the balanced ratio; for each cross validation, we have about 1,329 instances for training and 147 instances for testing. After preprocessing the raw data, we obtained that \(F_{ALL}=2207\).