# Applying Machine Learning Techniques to the Audit of Antimicrobial Prophylaxis
## 2 Materials and Methods
### Machine Learning Techniques  
Among the available machine learning systems, we used WEKA as the data mining software to aid the audit of antimicrobial prophylaxis [19]. WEKA provides implementations of various machine learning algorithms that can be easily applied to a dataset. The dataset is divided into 10 approximately equal partitions (also called 10 folds). In each turn, nine-tenths were used for training and one-tenth for testing. The process was repeated 10 times. Finally, every instance would be used exactly once for testing. This is called 10-fold cross-validation. Cross-validation is widely used as a reliable approach to evaluate the performance of machine learning techniques when data are all in one set [19]. The multilayer perceptron and decision tree algorithms were applied to evaluate the appropriateness of antimicrobial prophylaxis in this study. Ensemble methods with bagging and boosting algorithms were used to improve the performance of decision tree. Auto-WEKA is a system automatically searching through the WEKA's algorithms and their respective hyperparameter settings, by a Bayesian optimization method to achieve optimal performance [21]. SimpleLogistic was the optimal classifier selected by Auto-WEKA for the whole dataset in this study. SimpleLogistic is a classifier that employs the LogitBoost algorithm to build the logistic regression functions at the nodes of a tree and uses the CART algorithm for pruning. The most relevant attributes in the dataset are selected by performing a simple regression in each iteration. The optimal number of iterations is determined by cross-validation [22]. We compared the performance metrics and execution time of all these algorithms. Multilayer perceptron is an artificial neural network composed of multiple layers of perceptrons. The layers include one input layer, one or more hidden layers, and one output layer. Multilayer perceptron is usually trained by minimizing the squared-error loss function of network output to make a best estimate of the class probability. The weights of the connections between neurons are modified by a backpropagation algorithm, which is computed by a standard mathematical optimization algorithm, called gradient descent, to minimize the squared-error loss function [19]. The gradient descent algorithm requires derivatives of the squared-error loss function [19]. The squared-error loss function, \(E\), is defined as:  
\[E=\frac{1}{2}(y-f(x))^{2} \tag{1}\]  
where \(x\) is the weight of the input, \(f(x)\) is the neural network's prediction function obtained from the output unit, and \(y\) is the observed value of instance's class label. The derivative of \(f(x)\) with respective to \(x\) is as the following:  
\[\frac{df(x)}{dx}=f(x)(1-f(x)) \tag{2}\]The classification algorithm classifier J48 in WEKA provides the application of decision tree C4.5 algorithm [19]. The decision tree C4.5 algorithm is widely used because of its fast classification and high precision. Decision tree C4.5 uses gain ratio for feature selection and construction of a decision tree. Decision tree C4.5 can handle both continuous and discrete features [12; 23]. The decision tree algorithm applies attribute selection measure to determine the splitting criterion to partition the instances in \(D\) into individual branches and nodes. If the instances in a partition are all of the same class, the node becomes a leaf and is labeled with that class. The attribute with the least information entropy (or the least information impurity) has the highest information gain [12]. The dataset, \(D\), is a class-labeled training dataset.