Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

PLAGIARISM SCAN REPORT

Words Date May 07, 2022

Characters 5900 Excluded URL

0% 100% 0 45
Plagiarized Unique
Plagiarism Unique
Sentences Sentences

Content Checked
For Plagiarism

C)Precision
In many circumstances, classification accuracy is not a reliable predictor of model performance. When your class
distribution is skewed, this is one of these circumstances (one class is more frequent than others). In this situation,
even forecasting all samples as the most common class would result in a high accuracy rate, which makes no sense.
For example, in our defective vs non-defective classification above, if the model forecasts all samples as non-defective,
the model would score 1000/1100= 90.9 percent correct.
As a result, we must consider class-specific performance indicators as well. Precision is one of these measures, and it
is defined as follows:
Precision = (True Positive+ False Positive) / (True Positive+ False Positive).
In the preceding example, the accuracy of the Defective and Non-Defective classes may be computed as follows:
Precision Defective = #samples properly predicted as Defective/#samples predicted as Defective = 90/ (90+60) = 60%
Precision Non-Defective= 940/950= 98.9%
As we can see, the model predicts non-defective data significantly more accurately than defective. This is hardly
surprising given that the model has seen more non-defective photos during training, making it stronger at categorizing
that class.
D)Recall
Another significant metric is recall, which is defined as the proportion of samples from a class that the model correctly
predicts. In more formal terms:
Recall = True Positive / (True Positive+ False Negative)
As a result of our preceding example, the recall rate of defective and non-defective classes may be calculated as
follows:
Recall defective = 90/100 = 90%
Recall Non-defective= 940/1000 = 94 %
E) F1-Score
Depending on the application, you may wish to prioritize recall or accuracy. However, there are numerous situations
where both recall and accuracy are critical. As a result, it is logical to consider how to integrate these two into a single
measure. The F1-score, which is the harmonic mean of accuracy and recall, is a common statistic that combines
precision and recall.
F1-score = 2*Precision*Recall / (Precision + Recall).
So, for our classification example with the confusion matrix in Figure 1, the F1-score is
F1 Defective= 2*0.6*0.9 / (0.6+0.9) = 72 %.
The generalized definition of F-score is as follows. As we can see, F1-score is a subset of F_B when B = 1.
It is important to note that there is always a trade-off between accuracy and recall in a model; if you increase the
precision too much, you will observe a decrease in the recall rate, and vice versa.
5.RESULT AND DISCUSSION
All tests were run on Python 3.6 with an Intel Core i5-9300H 2.40 GHz processor, 8.0 GB RAM, and an NVIDIA
GeForce GTX 1080 Ti GPU. Table 3 displays the performance of the fault instance segmentation. To forecast the
output, both the train and test datasets use the same learned CNN architecture. The train and test datasets include 100
and 1000 sample pictures, respectively. It is discovered that the accuracy of the train dataset is greater than that of the

Page 1 of 2
test dataset. The model, in particular, has accuracies of 95 percent for training data and 75.35 percent for testing data.
A receiver operating characteristic (ROC) may be used to demonstrate the success of the statistical model of the
classifier in further analyzing the influence of the HoG in the preprocessing stage. The ROC curve is given in Figure 8
when HoG is not used as one of the preprocessing processes. The accuracy of the micro-average ROC is found to be
69 percent, whereas the accuracy of the macro-average ROC is 50 percent. However, when HoG is added in the
suggested technique, the ROC accuracies improve by up to 95 percent. In model, the test accuracy is lower than the
train accuracy. This is because the trained model does not see the test data, and the train data is exactly the data used
to train the model. Table 2 shows that the specificity and F1-score for the train dataset are both zero. This is due to the
fact that there will be no TN case in analyzing the training data since the training pictures are limited to those that
include a faulty area. In other words, non-defective photos cannot be used as training data. Furthermore, the specificity
in the test dataset in Table 2 is 75.35 percent, indicating that the majority of the testing pictures are non-defective and
that the model is capable of properly predicting them. To further assess the performance, confusion matrices for the
train and test datasets are presented in Tables 4 and 5, respectively. In summary, a confusion matrix is a common
statistic used to depict the categorization rate for each faulty or non-defective example. Table 4 shows that 97 of the
faulty areas were appropriately identified. Although there are 100 photos in total, it should be noted that each image
may have more than one flaws. There are 104 occasions where the model fails to recognize the problematic regions
appropriately. However, because of the high TN value the total testing accuracy is reasonable.
Precision
Recall
F1-score
support

0 0.57
1.00
0.73
4

1 1.00
0.62
0.77
8
Accuracy
0.75
12
Macro avg
0.79
0.81
0.75
12
Weighted avg
0.86
0.75
0.76
12
Table 2: The performance of the defect instances segmentation
Fig 7: Confusion matrix for train accuracy
Fig 8: Confusion matrix for test accuracy
Fig 9: plotting for accuracy
Fig 10: plotting for loss

Page 2 of 2

You might also like