## 1 Introduction  
Agriculture has a substantial impact on the development of the Gross Domestic Product (GDP) of developing countries. Thus, accurate crop yield estimation is important for food security and maintaining population health [1; 2]. Crop yields are estimated by using different factors such as nutrients, management practices, and weather. These factors are used for predicting yields over a large scale in a timely and concise manner. The purpose of this crop yield calculation is to guard against climate risk and guarantee food security, which is becoming increasingly important given climate change and the worsening of extreme weather conditions [3; 4; 5]. As the global population increases, the available arable land decreases, necessitating more effective utilization of land and enhancement of yields over expanding cultivated land [6]. Policymakers rely on various advisory and management services that include yield forecasts and uncertainty assessments to make timely import and export policy decisions. At the national level, yield prediction is mostly important for strategic and staple crops [7; 8]. Over time, land measurements for crop yields have been replaced by more sophisticated methods of estimation that rely on crop growth and management-based approaches. These are not only used to estimate yields but also provide suggestions for crop yield management [9]. As a result, data and information generated by agricultural equipment are the foundation of smart farms that are putting manufacturers in contact with digital technologies. Smart farms collect precise data using sensors and drones, such as weather information and soil mapping, among other things. To fulfill the population's food needs and ensure sustainable use of natural resources, it is becoming more vital to extract information from this data and create decision-support systems for farms [10]. Therefore, the agricultural industry uses Internet of Things (IoT) technology for predictive analysis on a large scale. The global information society is built on a foundation of fundamental and emergent Information and Communication Technologies (ICT), which together make up the IoT. Through the integration of virtual and physical items, the IoT offers advanced services [11]. New developments in IoT technology have made it possible to gather exact climatic data alongside precise and reliable yield data. High-quality data is readily available, but current yield prediction techniques still have a lot of obstacles to overcome, including difficulties in handling high-dimensional data, an inability to capture complicated non-linear correlations, and a lack of fundamental knowledge. These drawbacks highlight the need for a novel deep-learning model that captures complex connections, makes accurate forecasts, and efficiently uses reliable yield and climate data. Therefore, this study employs a deep learning architecture with hyperparameter optimization to predict coconut yields. It is difficult to calculate how several climatic elements, such as temperature, humidity, wind, and precipitation, interact with one another and affect crop yields. These requirements can be met by a deep learning model (LSTM), which enables data-driven agricultural decision-making by producing precise and reliable crop predictions. One of the most important tropical crops, coconuts are grown on 12.08 million hectares in 92 countries and yield 69 billion nuts annually [12]. Through processing, farming, marketing, and trade-related activities, coconuts provide 20 million people worldwide with food security and a chance at a healthy life, including 10 million people living in India alone. Consequently, rural economies are significantly impacted by the global coconut value chain [13]. Rainfall and air temperature are considered the main parameters since they affect the female flower's receptivity and pollen's feasibility which determines the yield under open field conditions [14; 15].