Page 211 - Ai_C10_Flipbook
P. 211
Step 28 Double-click on the Confusion Matrix widget to open it.
You will see a table showing the distribution of correct and incorrect predictions for each class, typically
as follows:
• True Positives (TP): Correctly predicted instances of the positive class.
• False Positives (FP): Incorrectly predicted instances of the positive class.
• False Negatives (FN): Incorrectly predicted instances of the negative class.
• True Negatives (TN): Correctly predicted instances of the negative class.
The confusion matrix will first show the results for the Logistic Regression algorithm.
You will see the counts of correct and incorrect predictions (TP, TN, FP, FN) for both classes (Bleached
and Unbleached).
Similarly, the confusion matrix will show the results for the SVM (Support Vector Machine)
algorithm.
This will allow you to compare how SVM performs against the other two models in terms of
classification errors.
Lastly, the confusion matrix will display the results for the Random Forest algorithm.
The matrix will show how well Random Forest performed in correctly and incorrectly predicting the
classes.
Step 29 Click the Close button to close the Confusion Matrix dialog box.
Once you have built and evaluated your model, the then you need to apply the model to new (unseen)
test data in order to make predictions.
The steps for predicting model are as follows:
Step 30 Drag the Import Image widget onto the canvas to bring in the test data (images you want to
classify based on the trained model).
Step 31 Right-click on the Import Image widget, and rename it to Testing Data. This helps you easily identify
the test dataset in your workflow.
Step 32 Double-click on the Testing Data widget, and select the directory that contains the test dataset
(images of bleached and unbleached corals).
Step 33 Click the Close button to close the Training Data dialog box.
Step 34 Drag and drop the Image Viewer widget onto the canvas.
Step 35 Connect the Training Data to the Image Viewer.
Step 36 Double-click the Image Viewer widget to view the images in the training dataset.
The Image Viewer widget will show the test dataset that you selected, allowing you to visually inspect
the images that will be used for predictions.
Step 37 Drag and drop the Image Embedding widget to the canvas, which will convert the images into
numerical features for prediction.
Step 38 Connect the Test Data widget (test dataset) to the Image Embedding widget, which processes the
images into numerical representations that can be used by the model.
Computer Vision 209

