Feature Selection and Hyperparameter Optimization of

Convolutional Neural Networks Using the Ocotillo Optimization

Algorithm for Pneumonia Detection from Chest X-Ray Images

Mona Yassen 1,* Ancy Cheriyan 2

1 Computer Science and Intelligent Systems Research Center, Blacksburg 24060, Virginia, USA

2 School of Artificial Intelligence, Bahrain Polytechnic, PO Box 33349, Isa Town, Bahrain

Emails: mona@jcsis.org ; ancy.cheriyan@polytechnic.bh

Received: April 19, 2026 Revised: June 28, 2026 Accepted: August 12, 2026 ⋆ Corresponding author

ABSTRACT

Pneumonia diagnosis from chest X-ray images remains clinically important because subtle radiographic abnormalities

can be difficult to assess consistently under high workload or limited expert availability. This study proposes an

optimization-guided diagnostic framework that integrates the Ocotillo Optimization Algorithm (OcOA) with a

Convolutional Neural Network (CNN) for binary pneumonia classification. Rather than introducing OcOA or

CNN as new algorithms, the contribution lies in using OcOA in two complementary stages: feature selection over

CNN-derived deep representations and hyperparameter optimization of the CNN classifier. The proposed pipeline

was evaluated on the Chest X-Ray Images (Pneumonia) dataset, which contains pediatric radiographs labeled as

Normal or Pneumonia. In the feature-selection stage, binary Ocotillo Optimization Algorithm (bOcOA) achieved

the lowest average error, with a value of 0.523417. After feature selection, the CNN baseline achieved the best

classification performance among the evaluated machine-learning models, reaching an accuracy of 0.94985. In the

hyperparameter optimization stage, OcOA+CNN achieved the strongest optimized performance, with an accuracy of

0.989939. These findings indicate that OcOA can improve CNN-based pneumonia detection by refining both the

feature space and the model configuration. The framework may support automated chest X-ray screening on the

studied dataset; however, external validation, statistical testing, and prospective clinical assessment remain necessary

before any clinical deployment claim can be made.

Keywords: Pneumonia Detection Chest X-Ray Classification Convolutional Neural Networks Feature Selection

Hyperparameter Optimization

1. INTRODUCTION

Pneumonia remains one of the most consequential respiratory

infections worldwide, not only because of its immediate clinical

severity but also because of the persistent burden it places

on healthcare systems, families, and diagnostic services. The

disease is commonly understood as an acute infection of

the lung parenchyma in which the alveolar spaces and surrounding

tissues become inflamed, often leading to fluid accumulation,

impaired gas exchange, fever, cough, respiratory

distress, and, in severe cases, hypoxemia or systemic deterioration.

Although pneumonia affects individuals across all age

groups, its impact is especially pronounced among children,

whose immune systems, airway anatomy, and vulnerability

to respiratory compromise make early recognition clinically

important. The World Health Organization identifies pneumonia

as a leading infectious cause of mortality in children,