Table 4 Acceptance criteria of disease detection model.

From: Monitoring and predicting cotton leaf diseases using deep learning approaches and mathematical models

Requirement ID

Requirement type

Description

Acceptance criteria

Req_1

Functional

The algorithm must initialize variables to track disease matches and expected diagnoses.

Variables DiseaseMatches, MostLikelyDisease, and HighestMatchCount are initialized to 0 or empty.

Req_2

Functional

The algorithm must iterate through all diseases to count symptom matches

The CountMatches loop iterates over DiseaseNames, updating DiseaseMatches with the count of matches.

Req_3

Functional

The algorithm should calculate the number of matching symptoms for each disease

newMatchCount correctly reflects the intersection of disease symptoms and SymptomInputs.

Req_4

Functional

The algorithm should update MostLikelyDisease to the disease with the highest match count.

MostLikelyDisease is assigned to the disease with the greatest DiseaseMatches count in the DetermineDisease loop.

Req_5

Functional

The algorithm must print the most expected disease and the number of matching symptoms.

Output statement displays MostLikelyDisease and HighestMatchCount.

Req_6

Non-functional

The algorithm should efficiently handle a large number of diseases and symptoms.

Completion time is within acceptable bounds when the number of DiseaseNames and SymptomsByDisease is large.

Req_7

Input

The input set SymptomInputs requirement contains the symptoms observed in the cotton plant.

SymptomInputs is a valid set with elements that can be compared to symptoms in SymptomsByDisease.

Req_8

Input

DiseaseNames should contain a list of all potential diseases

DiseaseNames is a non-empty sequence matching the order of SymptomsByDisease.

Req_9

Output

The output should include the identified disease and matching symptom count.

The output string includes the names Most LikelyDisease and HighestMatchCount.

Req_10

Error handling

If no disease has any matching symptoms, MostLikelyDisease should remain an empty string.

MostLikelyDisease is empty if the HighestMatchCount is 0.