Action Recommendation Model Development for Hydromon Application Using Deep Neural Network (DNN) Method

Abstract is a synopsis of the work containing the problems studied, the purpose of research, information and methods used to solve problems, and conclusions. Articles must be submitted in print-ready format and are limited to a minimum of ten (10) pages and a maximum of twelve (12) pages. Abstract is a synopsis of the work that contains the issues studied, the research purpose, the information and methods used to solve the problem, and the research conclusion. Abstracts are limited to 200 words and should not contain references, mathematic equations, figures, and tables. The font size for abstracts,


INTRODUCTION
This Agriculture is the foundation of human civilization and is responsible for producing high-quality food for the inhabitants of the world. Along with population growth and infrastructure development that can lead to a lack of agricultural land, good farming methods need to be used so as to guarantee the availability of cheap and quality products to meet food needs. Based on these problems, farming activities using the hydroponic method are expected to overcome these problems.
Hydroponics is a method of growing crops without the use of soil, using water as a solvent according to the nutrients needed by plants. However, plants developed by the hydroponic method are quite vulnerable so their conditions need to be continuously controlled so that their growth can run optimally. Currently, monitoring the condition of hydroponic plants is still done manually so it takes hard work involving hydroponic plant farmers to continuously monitor the condition of the plants and provide the necessary actions for the plants directly. This is considered ineffective because it requires more time and energy to do so, but it needs to be done to ensure the plants grow in good conditions.
Hydroponics is a method of growing crops without the use of soil. This method uses water as the solvent according to the nutrients that the plant needs. The advantage of the hydroponic method is that it can provide more optimal conditions for plant growth [1].
However, hydroponic farming methods have a higher level of complexity compared to conventional farming methods. This method is said to be complicated because it involves various equipment, such as containers, pumps, lamps, nutrients, and so on at a fairly high cost [2]. In addition, hydroponic plants are plants that are also fairly vulnerable so their condition needs to be continuously monitored and controlled.
This problem of monitoring and controlling hydroponic plants can be solved with the help of an Internet of Things (IoT) tool that allows farmers to automate the monitoring methods of such hydroponic plants. IoT is a development of technological devices that have the ability to receive data, process data, and send information to users with the help of software that is directly integrated with the internet [3].
Thus, various kinds of sensors and control systems can be used to automate agricultural systems with the hydroponic method. This automation process is also supported by the use of a recommendation system built with a machine learning model in the application to inform the actions that need to be taken by farmers based on the condition of the hydroponic plant.
Artificial intelligence (AI) or artificial intelligence is a data processing process based on analytical models that produce predictions, rules, answers, recommendations, or other similar results. This analytical model is built using programming concepts that explicitly know the relationship between the procedure and decision logic in a system that has intelligence [4].
Machine learning is a branch of science part of artificial intelligence built with programming languages that allow computers to think like humans and can improve their understanding through experience automatically. Machine learning has a focus on developing systems that are able to learn on their own to decide things without having to be programmed by humans through learning models built on the data owned [5].
There are 4 learning processes in machine learning, namely Supervised Learning, Unsupervised Learning, Semi-supervised Learning, and Reinforcement Learning [6]. The machine learning model developed in this study aims to create a system of action recommendations that need to be carried out by hydroponic plant farmers based on the condition of the hydroponic plant.
Deep learning is part of machine learning whose algorithms are inspired by the structure of the human brain. This algorithm is able to adapt to large amounts of data to solve various problems that are difficult to solve with other machine learning algorithms. Deep learning has gone beyond advanced approaches in computer vision and natural language processing to achieve previously unimaginable advances for challenging problems [7].
Deep learning is a model that can be used effectively on various devices such as IoT or mobile devices that have limited resources [8]. Deep learning has three types of parameters, namely weights and biases (model parameters, hyperparameters, and task parameters [9].
Weights and biases are linear parameters or tensors in the mock conditional network set during the training period. Hyperparameters are initial global variables that are manually set and affect the behavior of the function, its training algorithm, and its neural network architecture. Assignment parameters are parameters defined for a particular case. The parameter lies in the requirements of the problem, which need to be met and cannot be changed.
Neural Network is one of the machine learning algorithms inspired by how the human brain works. The machine learning algorithm consists of many neurons that are interconnected with each other. Meanwhile, deep neural networks are part of deep learning which is a development of the method by adding more layers to the architecture.
In this study, the algorithm architecture of deep neural networks was built with the help of the TensorFlow framework. The algorithm consists of several layers and the use of hyperparameter values adapted to the aim of building a model of recommendations for actions that farmers can perform based on the condition of hydroponic plants monitored in real-time [10].
Unlike conventional methods, deep neural networks trade domain expertise in feature engineering and model training with automated feature learning that exists on the availability of large amounts of data [7]. While on the one hand, the large number of network parameters allows greater flexibility and allows deep neural networks to model more complex relationships, training deep neural networks take a lot of time.
For example, a deep neural network may require several weeks or months of training time, running on a cluster of high-performance computers or application-specific integrated circuits. This is in contrast to traditional machine learning algorithms which only take a few hours at most on a laptop computer. On the other hand, deep neural network's phase inference is very fast, so it can run in real-time on small, heavy, and powerful hardware, such as embedded processors [7].
The most important concept in deep neural network is their weight [11]. An example of a deep neural network can be seen in Figure  1. In Figure 1 there are four input units and two output units. In a deep neural network, it is necessary to find one or more patterns from the input layer, so that these patterns can be used to classify one output layer. To do so, it is necessary to design a number of hidden layers with an activation function Figure 1 consists of three hidden layers with each layer consisting of seven hidden units. Deep neural networks excel at finding hierarchical representations that accomplish complex tasks through large data sets and have been demonstrated in studying many object classes that play an important role in classifying classes [12]. Deep neural networks have become a standard tool for solving various computer vision problems [13].
Deep neural networks typically use nonlinear activation functions that allow to create complex non-linear mappings between the given input and the resulting output, which is important for studying and modeling complex data, such as images, videos, audio, and in data sets. general where the relationship between the desired input and output is not linear [14]. The calculation for the hidden layer can be seen in formula 1 [15]. (1) (x))))))))] (1) With hidden layer output h (l) (x). Each preactivation function a (l) (x) is usually a linear operation with a matrix W (l) and bias b (l) , which can be combined into a parameter Ɵ. The notation "hat" ̂ indicates that 1 has been added to the vector x. The hidden layer activation function h (l) (x) often has the same form at each level, but this is not a requirement.
Tensorflow is an open-source deeplearning framework used for machine learning applications. This framework can facilitate the machine learning process in the fields of speech recognition, image classification, object detection, text classification, etc. TensorFlow framework can be used to train deep learning models to perform object detection and classification in real-time [16]. lite is an opensource deep learning framework that can be used on devices to assist with machine learning modeling on those devices [17].
TensorFlow was created by researchers at Google and is the most popular among most deep learning libraries. TensorFlow greatly facilitates and speeds up the research and application of neural network models and applies its concepts to build and train convolutional neural network models for classification [18].
Based on these problems and potential solutions, in general, this study aims to develop a model that allows farmers to manage and monitor hydroponic crop conditions and take action based on the recommendations given. The model created covers the entire process and is integrated into a mobile application called Hydromon to assist in the process of cultivating hydroponic plants. In particular, this study aims to develop a system of recommendations for actions that need to be carried out by farmers based on the conditions of the hydroponic plants.
The model made later can be made into a tool which is an Internet of Things, so that farmers can really feel the benefits. This research will use methods, namely Deep Neural Network and also TensorFlow, so this research is included in Artificial Intelligence and also the Internet of Things. Deep Neural Network was chosen because the authors considered that they were able to represent the problem of this research after studying and comparing it with other learning methods.

II. METHODOLOGY
This research was developed using several stages, namely business process understanding, data understanding, data preparation, modeling, evaluation, and deployment. The stages carried out are as follows.

Business Understanding
The business understanding stage is the stage of defining the problem and the purpose of a study. The purpose of this study is to build a model that can provide recommendations for actions that need to be carried out by farmers based on the condition of the hydroponic plant. The model is built using a deep neural network architecture by training data that is formed independently based on three attribute conditions of hydroponic plants, namely pH, TDS, and light intensity. The limitations of this study are the condition of training and validation data that is not obtained from valid sources and the number of hydroponic plant attributes that are controlled is still relatively minimal.

Data Understanding
The data understanding stage is the stage of introducing the data used for the data processing process so that the data used in the research also needs to be adjusted to the purpose of the study. Therefore, to meet the research objectives, data with three attributes are needed that describe the condition of hydroponic plants, namely the pH, TDS, and light intensity attributes. Based on these three attributes, 18 labels or actions can be formed by farmers. The training data and validation data are then formed independently according to the number of labels obtained. That is, if there are 18 labels, then each label is formed with 1000 data that reference the various possible conditions of the hydroponic plant. Meanwhile, the test data is obtained directly by taking data from sensors that are integrated with hydroponic plants.

Data Preparation
The data preparation stage is the stage of processing raw data into data that is ready to be used for data processing. Some of the stages of data preparation carried out are data retrieval based on the three data attributes to be used, randomization of data with the shuffling method, adjustment of data type and size, sharing of training data and validation data, and normalizing data with the MinMaxScaler method.

Modeling
The modeling stage is the stage for implementing algorithms for the data processing process. This stage needs to be adjusted to the data owned so that the results of data processing can be in accordance with their purpose. In this study, a deep neural network algorithm with 5 layers in it was formed with the aim of classifying multiclass labels. The first modeling process carried out is the creation of a checkpoint function with the help of the TensorFlow library to store temporary training results in personal storage, as well as a training stop function with the help of the TensorFlow library which is used to stop training when the missing value of validation data has reached the desired value. The next process is the formation of a deep neural network model with five layers consisting of one input layer, three hidden layers, and one output layer in it.
This model is also formed with the help of the TensorFlow library, then the formation of a compiler to run the model using three parameters, namely optimizer, loss, and metrics. The next process is to execute the training process with an adjusted amount of training, this training process also applies some processes that have previously been carried out. After the training process is complete and the value of accuracy and validation can be observed, the next process is to form a form of visualization that can describe the accuracy of the training and validation process.

Evaluation
The evaluation stage is carried out to see the quality of the model that has been formed. This stage is carried out by looking at the evaluation value of the model, then testing it using data taken directly from sensors integrated with hydroponic plants. After the data is obtained, the next process is the definition of several action recommendations that farmers can do, of course, the action recommendations that are defined manually are adjusted to the labeling process that has been carried out at the data understanding stage. The next process is testing the model with the data that has been taken before, then the results of the test will be visualized.

Deployment
The deployment stage carried out is to document the results of the research in the form of making research reports. In addition, another deployment process is the process of converting the model into a TensorFlow lite that can be used in IoT tools and Hydromon applications.

III. RESULTS AND DISCUSSION
The business understanding stage of this study is to build a model with a deep neural network architecture by training data that is formed independently based on three hydroponic plant conditions, namely pH, TDS, and light intensity. The model can provide recommendations for actions that farmers need to take based on the condition of the hydroponic plant. The next stage is the data understanding process to obtain data that can be used in accordance with the research objectives. Thus, data was formed with three attributes that describe the condition of hydroponic plants, namely the pH, TDS, and light intensity attributes. Based on these three attributes, 18 labels or actions can be formed by farmers. The training data and validation data are then formed independently according to the number of labels obtained. That is, if there are 18 labels, then each label is formed with 1000 data that reference the various possible conditions of the hydroponic plant. Meanwhile, the test data is obtained directly by taking data from sensors that are integrated with hydroponic plants.   The next stage is the preparation of data before the model creation process is carried out. This stage implements several stages of data preprocessing. The first stage is data retrieval according to three data attributes that will be used for the training process, namely pH, TDS, and light intensity. The data will then be scrambled by the data shuffling method. The next stage is to adjust all the data with a similar data type, namely the float32 data type. The next stage is the division of all the data into training data which amounts to 80% (14,400 data) and validation data as much as 20% (3600 data) of the total data. The next stage is the normalization of the training data and validation data with the MinMaxScaler method. The next stage is modeling which is the stage for implementing algorithms for the data processing process. In this study, an algorithm with a deep neural network with 5 layers in it was formed with the aim of classifying multiclass labels. The first modeling process carried out is the creation of a checkpoint function with the help of the TensorFlow library to store temporary training results in personal storage, as well as a training stop function with the help of the TensorFlow library which is used to dismiss training when the validation data loss value has reached the specified value.
The next process is the formation of a deep neural network model with the help of the TensorFlow library. The architecture of the model with five layers consists of one input layer with 128 neurons and a relu activation function to enter training data, three hidden layers which each have neurons totaling 64, 32, and 16 with a relu activation function, and one output layer with 18 neurons according to the number of labels you want to classify and the softmax activation function. The next stage is the formation of a compiler to run the model using three parameters, namely adam optimizer, sparse categorical crossentropy loss, and the use of accuracy values as metrics. The next process is to execute the training process with 100 epochs,   After the training process is complete and the value of accuracy and validation can be observed, the next process is to form a form of visualization that can describe the accuracy of the training and validation process. The next stage is an evaluation carried out to see the quality of the model that has been formed. The first stage that is carried out is to look at the loss value and accuracy of the model that has been trained and validated. The results in the training data showed a loss value of 7.19% and an accuracy value of 97.02%, while the test data showed a loss value of 8.64% and an accuracy value of 96.47%. Next is the stage of testing directly using data taken from sensors integrated with hydroponic plants.  0  379  713  6033  3  1  425  643  6040  3  2  993  659  4716  4  3  1067  834  5982  6  …  …  …  …  …  17997  771  738  4002  4  17998  934  920  6980  13  17999  484  743  4720  16 After the data is obtained, the next process is the definition of several action recommendations that farmers can do, of course, the action recommendations that are defined manually are adjusted to the labeling process that has been carried out at the data understanding stage.

Figure 8. Defined action recommendations
The next process is testing the model with the data that has been taken and the recommendations that have been defined, then the results of the test will be visualized. It can be seen in the picture, from several iterations carried out to test the model, excellent results were obtained.
This indicates that the model formed is fairly accurate to provide recommendations for actions that need to be carried out by farmers of hydroponic plants. After the evaluated model has shown good results, then the next step is the deployment stage by converting the model into a TensorFlow lite form so that the model can be used in IoT tools and Hydromon applications.

IV. CONCLUSION
The results of the model development that the author carried out together with the machine learning model development team showed that the developed model was good enough to support the action recommendation system with an accuracy value of 96.47% on the test data. The results of this model will then be placed on IoT tools and Hydromon applications as a recommendation system for actions that farmers need to do based on the condition of the hydroponic plant. In the future, advanced development of the model can be carried out using a more diverse number of layers and hyperparameters, as well as the development that allows the system to provide recommendations for more diverse attributes.