## 1 Introduction  
IoT brings more changes to the life of humans and increases the quality of life [1] by integrating Artificial Intelligent (AI) and cloud computing [2, 3]. In recent trends, the Internet of Things (IoT) is considered to be the more attractive and revolutionary technology that plays a vital role in various fields such as healthcare, house automation, smart cities [4, 5],wearable devices and so on. IoT greatly influences the healthcare industry which in turn helps various applications of smart healthcare [6]. IoT acts as a base for innovative ideas such as Cyber-physical Systems (CpS) [7], smart cities [5] and Industry 4.0 [8]. In the future, fog computing [9] is used to address the demand for real-time service, which is increasing. Fog computing acted as a platform that provides more storage space, real-time computation power and network services among data centres and end users. By using IoT-Fog computing, many time-sensitive data and services are carried out which include emergency health services and medical diagnosis. Smart healthcare includes various applications such as intelligent patient monitoring, wireless tracking of health and mobile healthcare. Many cities aim to establish the idea of smart city healthcare by means of conventional equipment and devices that integrate the resources of healthcare and smart solutions [10]. Generally, Machine Learning (ML) models consist of many predictor variables and require less a priori hypothesis in comparison to statistical models [11]. In the ML-based approach, SVM (Support Vector Machine) and RF (Random Forest) are used to allow fewer assumptions and many difficult relations between predictors. The algorithms are combined with RFE (recursive feature elimination) to provide the optimal predictors for UTI by using the biomarkers present in urine [12]. To monitor the well-being and health of people who suffered from dementia, IoT has been used, and it also combines ML techniques. The model helps in providing more effective preventive care, which reduces hospitalization [13]. UTI [14] is a particular kind of infection that occurs in various parts of the urinary system, which includes the kidneys, urinary bladder and ureters. After kidney transplantation, many people suffer due to UTI [15]. UTI has been found in both genders irrespective of age [15]. At the age of 24, one out of three women has at least one symptom of UTI, and while considering the lifetime, nearly half a population is affected [16]. A survey by the WHO (World Health Organization) confesses that over 1 million people were hospitalized in 2011 due to UTI [17]. However, quick detection of UTI can prevent people from permanent kidney problems, blood loss and severe pain. Several tests are available to test for UTIs, but home-based UTI testing and detection provide an efficient way for precautionary measures. However, the diagnosis of UTI is still challenging, and current techniques are often prone to more errors. To overcome the issue, several studies have explored the use of ML algorithms to predict UTIs. However, the accuracy of these algorithms is limited due to the improper selection of features. Therefore, the present study aims to develop an ML-based algorithm for UTI prediction in an IoT-Fog environment based on the application of a smart toilet. Additionally, the present study aims to enhance the accuracy rate of UTI prediction, which plays a significant role in patient care. Further, many IoT devices are available and have an increased capability in acquiring the specific parameters of urine and the determination of UTIs. Especially, IoT includes internet-enabled sensors that have the ability to obtain universal data and transfer the data to a remote location [18]. Additionally, the devices have used technologies that are easily available and hence can be used in a smart toilet system. IoT technology provides a considerable revolution in the recent healthcare industry, which helps in monitoring remote patients, smart health services and mobile healthcare.