# Ensemble Method of Triple Naive Bayes for Plastic Type Prediction in Sorting System Automation
## 2 Materials and Methods
### Methods  
Model development begins with transforming data from numerical form to categorical form using discretization, consisting of crisp discretization and fuzzy discretization. Each is built based on the notion of crisp and fuzzy set membership. In the notion of crisp set, an entry of universal \(X\) is denoted as \(x\in A\) if it is a member of set \(A\). On the contrary, if \(x\) is not an entry of \(A\), it is denoted as \(x\
ot\in A\). Consequently, the membership degree of \(x\) in set \(A\) is limited to either 1 or 0, which is written as \(\mu_{A}(x)=1\) or \(\mu_{A}(x)=0\)[22]. In the notion of fuzzy set, the membership degree \(x\) in set \(A\) is contained in the range \([0,1]\). This value is formulated in a function called the fuzzy membership function. This function shows the value of the membership of each value in a given fuzzy set \(\stackrel{{\sim}}{{X}}_{d}\). If \(x\) possesses the highest membership value, it is considered a member of set \(A\)[22; 35]. The number of categories in each predictor variable is determined by antecedent information or expert justification in crisp discretization, and the interval boundaries between categories are distinct [22; 29]. Determining the category interval limits for each  
Figure 1: Capturing process of plastic waste. numeric variable with a ratio scale using (1), \(x_{d}{}^{o}\) and \(x_{d}\) are the \(d\)-th continuous and the \(d\)-th discretized predictor variable values, respectively [22]:  
\[x_{d}=x_{d}{}^{o}+\text{Range}(x_{d}{}^{o}) \tag{1}\]  
The number of categories in fuzzy discretization is determined by the categories that are established through crisp discretization, but it also accommodates overlapping class intervals [22]. Each variable is discretized through three categories, and each category is represented by a single fuzzy membership function. Suppose \(X\) is the universal set of the fuzzy set, \(\overset{\sim}{X}_{d}\), with element \(x_{f}\) and membership function \(\mu_{\overset{\sim}{X}_{d}}\left(x_{f}\right)\), then the fuzzy set \(\overset{\sim}{X}_{d}\) is the ordered pairs of each \(x_{f}\) and \(\mu_{\overset{\sim}{X}_{d}}\left(x_{f}\right)\)[35]:  
\[\overset{\sim}{X}_{d}=\left\{\left(x_{f},\mu_{\overset{\sim}{X}_{d}}\left(x_ {f}\right)\right)\middle|x_{f}\in X\right\} \tag{2}\]  
The fuzzy membership function \(\mu_{\overset{\sim}{X}_{d}}\left(x_{f}\right)\) is defined as \(\mu_{\overset{\sim}{X}_{d}}\left(x_{f}\right):X\rightarrow[0,\,1]\), and every element \(x_{f}\) of \(X\) is assigned a value within the interval \([0,1]\). Naive Bayes is a high-performance method for making predictions based on digital images [36; 37], especially those that handle the vagueness that results from discretization [22]. However, sometimes this method also does not provide satisfactory performance [38]. The ensemble method is a machine learning-based algorithm that integrates multiple single prediction methods to enhance performance [30]. This technique is one of the solutions available when the prediction performance of a single prediction method is not satisfactory [31]. In this work, we suggest an ensemble method constructed from three basic naive Bayes models to predict plastic types. We form one naive Bayes model based on the results of the crisp discretization and two naive Bayes models based on the fuzzy discretization. Each discretization is formed based on antecedent information that the predictor variables obtained from digital image processing are categorized into dark, moderate, and light for each red, green, and blue color channel. The higher the color pixel value in each channel, the lighter the color displayed. The variance and entropy variables are also classified into three categories: low, moderate, and high. A higher value is indicated by a higher number in these two variables. In the naive Bayes method, an object or observation is predicted into a specific class based on the maximum posterior probability.