# Raw Material Flow Rate Measurement on Belt Conveyor System Using Visual Data
## 4 Experimental Evaluations
### Results & Discussion  
The purpose of the proposed framework is to make the process of measuring the material flow over the belt more efficient, and less prone to error using the mounted visual sensor. The experimental work is carried out to cater the varying environmental scenarios and to eliminate the need for human intervention. The goal is to determine the optimal settings for variable frequency drive and thus, defining the optimal amount of the material being carried on the belt by using image processing and machine learning techniques. The results are evaluated based on two types of validation, k-fold cross-validation and leave-one-out validation. The cross-validation is used to evaluate the model's performance on limited data. In k-fold cross-validation, k represents the number of non-overlapping groups or splits into which the data is split. At each iteration, one group is separated as test data. Meanwhile, the rest of the groups are used for training the model. The data is iterated k number of times to test each group of the model and evaluate the model's performance. This technique gives better confidence in our model performance. For testing our model, we have set the value of k to 5, and the average of all five splits is used as its final metric value. Leave-one-out is also a type of cross-validation, but in this technique each data sample is a separate group, meaning that only one data sample is used as the test data and all other data is used for model training. Leave-one-out is mainly used for asmaller dataset as it is repeated for each example in the dataset. Given our limited data, it represents a suitable choice. After the features are extracted from the video sequences, the data is split into test train splits using the cross-validation techniques mentioned above. The training set contains the features calculated for each frame of the sample and its respective flow rate value, which serves as our predictor variable. At each iteration, the features are selected from the training data and the model is trained only on the selected features. Then same features are selected for the test dataset, and the model is evaluated further. Finally, we have evaluated the model's performance with and without the feature selection technique. The figure shows the performance of the trained models based on the parameters defined above on a single test example. Results are also separately evaluated based on the window size used to aggregate the data and also the type of aggregation used on the data in each window. The three aggregation methods used are sum, mean, and a combination of both sum and mean. In the combination of both sum and mean, the aggregated results from both sum and mean are included as part of the feature vector. Finally, the whole data is evaluated on the best-fitted parameters. The figure demonstrates the results of selected models on different window sizes and the type of aggregation performed. Machine learning algorithms are also divided into two categories: Linear and non-linear. The non-linear category includes models such as Decision Tree, XGBoost, Random Forest, Bagging Regressor, and Gradient Boosting. On the other hand, the linear models category comprises the Gamma Regressor, Bayesian Ridge, RANSAC, and Theil-Sen Regressor. The primary reason for using Linear models was twofold. Firstly, linear models have a lower risk of overfitting, making them suitable for datasets with limited samples. Secondly, linear models can effectively handle high-dimensional data, where the number of features exceeds the number of samples. Furthermore, the linear models, including the Gamma Regressor, RANSAC, and Theil-Sen Regressor, have exhibited robustness in dealing with outliers during prediction. Given the existence of numerous outliers in our input data, such as fluctuating lighting conditions and dust, these algorithms emerged as logical choices for the task.