{"id":46728,"date":"2022-11-19T00:00:00","date_gmt":"2022-11-19T08:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/"},"modified":"2025-11-13T12:56:17","modified_gmt":"2025-11-13T20:56:17","slug":"diabetes-prediction-using-machine-learning-java-and-griddb","status":"publish","type":"post","link":"https:\/\/griddb.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/","title":{"rendered":"Diabetes Prediction using Machine Learning, Java, and GridDB"},"content":{"rendered":"<p>This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of machine learning models to create a predictive system. This model will use random-forest to predict if patients have diabetes or not. The article will outline the requirements needed to set up our database <strong>GridDB<\/strong>. Following that, we will briefly describe our dataset and model. To finish off, we will interpret the results and come up with our conclusion.<\/p>\n<p><a href=\"https:\/\/github.com\/griddbnet\/Blogs\/tree\/diabetes-prediction\">full source code here<\/a><\/p>\n<h2>Requirements<\/h2>\n<p>The <strong>GridDB<\/strong> database storage system will be a backup memory resource while building our random forest module. <strong>GridDB<\/strong> must be downloaded and configured in your operating system to be fully functional.<\/p>\n<p>Make sure to run the following command to update the needed environment variables:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">export GS_HOME=$PWD\nexport GS_LOG=$PWD\/log\nexport PATH=${PATH}:$GS_HOME\/bin\nexport CLASSPATH=$CLASSPATH:\/usr\/share\/java\/gridstore.jar\nexport CLASSPATH=${CLASSPATH}:\/usr\/share\/java\/weka.jar<\/code><\/pre>\n<\/div>\n<p>In your Java class, you should ensure a running <strong>GridDB<\/strong> cluster. This task should begin with the creation of a <strong>GridDB<\/strong> container. This task should include the container schema, represented by our dataset columns.<\/p>\n<p>The code below is used to achieve the above tasks:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\/\/ Manage connection to GridDB\nProperties properties = new Properties();\nproperties.setProperty(\"notificationAddress\", \"239.0.0.1\");\nproperties.setProperty(\"notificationPort\", \"31999\");\nproperties.setProperty(\"clusterName\", \"cluster\");\nproperties.setProperty(\"database\", \"public\");\nproperties.setProperty(\"user\", \"admin\");\nproperties.setProperty(\"password\", \"admin\");\n\n\/\/ Get Store and Container\nGridStore store = GridStoreFactory.getInstance().getGridStore(properties);\nstore.getContainer(\"newContainer\");\nString containerName = \"mContainer\";\n\n\/\/ Define container schema and columns\nContainerInfo containerInfo = new ContainerInfo();\nList&lt;columninfo> columnList = new ArrayList&lt;\/columninfo>&lt;columninfo>();\ncolumnList.add(new ColumnInfo(\"key\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"Pregnancies\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"Glucose\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"BloodPressure\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"SkinThickness\", GSType.INTEGER))\ncolumnList.add(new ColumnInfo(\"Insulin\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"BMI\", GSType.FLOAT));\ncolumnList.add(new ColumnInfo(\"DiabetesPedigreeFunction\", GSType.FLOAT));\ncolumnList.add(new ColumnInfo(\"Age\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"Outcome\", GSType.INTEGER));\ncontainerInfo.setColumnInfoList(columnList);\ncontainerInfo.setRowKeyAssigned(true);\nCollection&lt;Void, Row> collection = store.putCollection(containerName, containerInfo, false);\nList&lt;row> rowList = new ArrayList&lt;\/row>&lt;row>();&lt;\/row>&lt;\/columninfo><\/code><\/pre>\n<\/div>\n<p>In our random-forest Java program, we need to import classes from four library groups:<\/p>\n<ul>\n<li><code>java.util<\/code>: used to read our dataset and write it in our database.<\/li>\n<li><code>java.io<\/code>: used for input and output operations that will be used in our program.<\/li>\n<li><code>com.toshiba.mwcloud.gs<\/code>: used to set up and operate the <strong>GridDB<\/strong> database.<\/li>\n<li><code>weka.classifier.trees<\/code>: used to implement and configure our random forest module. <\/li>\n<\/ul>\n<p>Find below the Java code used to implement the task explained above:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\/\/ ---------- Java Util ---------\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Properties;\nimport java.util.Random;\nimport java.util.Scanner;\n\n\/\/ ---------- Java IO ---------\nimport java.io.IOException;\nimport java.io.File;\nimport java.io.BufferedReader;\nimport java.io.FileReader;\n\n\/\/ ---------- GridDB ---------\nimport com.toshiba.mwcloud.gs.Collection;\nimport com.toshiba.mwcloud.gs.ColumnInfo;\nimport com.toshiba.mwcloud.gs.Container;\nimport com.toshiba.mwcloud.gs.ContainerInfo;\nimport com.toshiba.mwcloud.gs.GSType;\nimport com.toshiba.mwcloud.gs.GridStore;\nimport com.toshiba.mwcloud.gs.GridStoreFactory;\nimport com.toshiba.mwcloud.gs.Query;\nimport com.toshiba.mwcloud.gs.Row;\nimport com.toshiba.mwcloud.gs.RowSet;\n\n\/\/ ----------- Weka ---------\nimport weka.core.Instances;\nimport weka.core.converters.ConverterUtils.DataSource;\nimport weka.classifiers.trees.RandomForest;\nimport weka.classifiers.Evaluation;<\/code><\/pre>\n<\/div>\n<h2>The Dataset<\/h2>\n<p>To implement the random-forest algorithms, we will use the <strong>diabetes<\/strong> dataset to predict whether an individual has diabetes based on diagnostic measurements. The dataset is composed of <strong>9<\/strong> attributes and <strong>768<\/strong> instances.<\/p>\n<p>The attributes covered in this dataset are as follows:<\/p>\n<ul>\n<li><strong>Pregnancies<\/strong>: Numerical value used to identify the historical data of pregnancy.<\/li>\n<li><strong>Glucose<\/strong>: Numerical value used to quantify the glucose level.<\/li>\n<li><strong>Blood Pressure<\/strong>: Numerical value used to quantify blood pressure.<\/li>\n<li><strong>Skin Thickness<\/strong>: Numerical value used to quantify skin thickness.<\/li>\n<li><strong>Insulin<\/strong>: Numerical value used to quantify the insulin level.<\/li>\n<li><strong>BMI<\/strong>: Numerical value used to quantify the Body Mass Index.<\/li>\n<li><strong>Diabetes Pedigree Function<\/strong>: Numerical value used to quantify the diabetes pedigree function.<\/li>\n<li><strong>Age<\/strong>: Numerical value used to quantify a patient&#8217;s age in years.<\/li>\n<li><strong>Outcome<\/strong>: A binary value used to determine whether an individual has diabetes (<strong>1<\/strong>) or not (<strong>0<\/strong>).<\/li>\n<\/ul>\n<p>Find below an extract of the dataset:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">Pregnancies,Glucose,BloodPressure,SkinThickness,Insulin,BMI,DiabetesPedigreeFunction,Age,Outcome\n6,148,72,35,0,33.6,0.627,50,1\n1,85,66,29,0,26.6,0.351,31,0\n8,183,64,0,0,23.3,0.672,32,1\n1,89,66,23,94,28.1,0.167,21,0\n0,137,40,35,168,43.1,2.288,33,1\n5,116,74,0,0,25.6,0.201,30,0\n3,78,50,32,88,31,0.248,26,1\n10,115,0,0,0,35.3,0.134,29,0\n2,197,70,45,543,30.5,0.158,53,1\n8,125,96,0,0,0,0.232,54,1<\/code><\/pre>\n<\/div>\n<p>We must use Java to read the <strong>diabetes<\/strong> dataset file to confirm we are ready for the next step. Once this task is completed, we will use the <strong>GridDB<\/strong> database to store this dataset in our long-term storage.<\/p>\n<p>In the following code, we implement the steps described above:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">while (sc.hasNext()){  \n    int i = 0;\n    Row row = collection.createRow();\n\n    String line = sc.next();\n    String columns[] = line.split(\",\");\n\n    int pregnancies = Integer.parseInt(columns[0]);\n    int glucose = Integer.parseInt(columns[1]);\n    int bloodpressure = Integer.parseInt(columns[2]);\n    int skinthickness = Integer.parseInt(columns[3]);\n    int insulin = Integer.parseInt(columns[4]);\n    float bmi = Float.parseFloat(columns[5]);\n    float diabetespedigreefunction = Float.parseFloat(columns[6]);\n    int age = Integer.parseInt(columns[7]);\n    int outcome = Integer.parseInt(columns[8]);\n\n    row.setInteger(0, i);\n    row.setInteger(1, pregnancies);\n    row.setInteger(2, glucose);\n    row.setInteger(3, bloodpressure);\n    row.setInteger(4, skinthickness);\n    row.setInteger(5, insulin);\n    row.setFloat(6, bmi);\n    row.setFloat(7, diabetespedigreefunction);\n    row.setInteger(8, age);\n    row.setInteger(9, outcome);\n\n    rowList.add(row);\n\n    i++;\n}<\/code><\/pre>\n<\/div>\n<h2>Implementing a Random Forest Algorithm in Java<\/h2>\n<p>This article will employ a classification model that outperforms a decision tree. The random forest algorithm is the name given to this algorithm. To understand why this model was chosen, we must first explain the advantages of using it over a decision tree. First, the random forest algorithm takes advantage of the fact that many trees are created and averages the results to provide the best possible accuracy. This improves the module&#8217;s suitability for numerical datasets. Second, our problem statement is diabetes prediction, which relies heavily on diagnostic measurements. In other words, because this is a numerical dataset, the random forest is the ideal solution. The <code>weka.classifier.trees<\/code> package will be used in our Java implementation because it contains the random-forest source code. This library will be used to implement our model and run the evaluation process to ensure that the data is valid and accurate.<\/p>\n<h2>Write Data into GridDB<\/h2>\n<p>A long-term storage database is critical for model reusability and accessibility. This set can be accomplished by using the <code>List&lt;Row&gt;<\/code> datatypes, which begin by storing our values in a list and then adding them to our <strong>GridDB<\/strong> database later on.<\/p>\n<p>The following code was used to conduct the task explained in this section:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">row.setInteger(0, i);\nrow.setInteger(1, pregnancies);\nrow.setInteger(2, glucose);\nrow.setInteger(3, bloodpressure);\nrow.setInteger(4, skinthickness);\nrow.setInteger(5, insulin);\nrow.setFloat(6, bmi);\nrow.setFloat(7, diabetespedigreefunction);\nrow.setInteger(8, age);\nrow.setInteger(9, outcome);\n\nrowList.add(row);<\/code><\/pre>\n<\/div>\n<h2>Store the Data in GridDB<\/h2>\n<p>We must use the correct column names and datatypes to store our data in the <strong>GridDB<\/strong> database. First, we should complete this task by inspecting the data types of our attributes and mapping them in our database. After examining our dataset, we discovered that all our features are numerical values. In other words, in our mapping process, no strings or characters must be determined. Following that, we must distinguish between integer and float values. This step is simple because we can see that the BMI and diabetes pedigree function scores are all floats and the other values are integers.<\/p>\n<p>The following code was used to conduct the task explained in this section:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\/\/ Define container schema and columns\nContainerInfo containerInfo = new ContainerInfo();\nList&lt;columninfo> columnList = new ArrayList&lt;\/columninfo>&lt;columninfo>();\n\ncolumnList.add(new ColumnInfo(\"key\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"Pregnancies\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"Glucose\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"BloodPressure\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"SkinThickness\", GSType.INTEGER))\ncolumnList.add(new ColumnInfo(\"Insulin\", GSType.INTEGER));\n\ncolumnList.add(new ColumnInfo(\"BMI\", GSType.FLOAT));\ncolumnList.add(new ColumnInfo(\"DiabetesPedigreeFunction\", GSType.FLOAT));\n\ncolumnList.add(new ColumnInfo(\"Age\", GSType.INTEGER));\ncolumnList.add(new ColumnInfo(\"Outcome\", GSType.INTEGER));&lt;\/columninfo><\/code><\/pre>\n<\/div>\n<h2>Retrieve the Data from GridDB<\/h2>\n<p>In this section, we will verify the code validity. This section will ensure that the data was correctly stored in our database and that there were no errors. We will use the <code>SELECT<\/code> query to complete this task, which returns all database values.<\/p>\n<p>The following code was used to conduct the task explained in this section:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">Container<?, Row> container = store.getContainer(containerName);\n\nif (container == null) {\n    throw new Exception(\"Container not found.\");\n}\n\nQuery&lt;row> query = container.query(\"SELECT * \");\nRowSet&lt;\/row>&lt;row> rowset = query.fetch();&lt;\/row><\/code><\/pre>\n<\/div>\n<p>Once the data was retrieved from our database, the next step would be to print our data. This task will require using a loop and a <code>System.out.println()<\/code> function.<\/p>\n<p>The following code was used to display our <strong>GridDB<\/strong> data:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\/\/ Print GridDB data\nwhile ( rowset.hasNext() ) {\n    Row row = rowset.next();\n\n    int pregnancies = row.getInt(0);\n    int glucose = row.getInt(1);\n    int bloodpressure = row.getInt(2);\n    int skinthickness = row.getInt(3);\n    int insulin = row.getInt(4);\n    float bmi = row.getFloat(5);\n    float diabetespedigreefunction = row.getFloat(6);\n    int age = row.getFgetIntloat(7);\n    int outcome = row.getInt(8);\n\n    System.out.println(pregnancies);\n    System.out.println(glucose);\n    System.out.println(bloodpressure);\n    System.out.println(skinthickness);\n    System.out.println(insulin);\n    System.out.println(bmi);\n    System.out.println(diabetespedigreefunction);\n    System.out.println(age);\n    System.out.println(outcome);\n}<\/code><\/pre>\n<\/div>\n<h2>Build the Random Forest<\/h2>\n<p>In our Java program, the random forest model will forecast the possibility of a patient&#8217;s diabetes diagnosis. Our code will first initialise the random forest object. The random forest algorithm will then be set up using the standard <strong>WEKA<\/strong> parameters.<\/p>\n<p>The following code was used to conduct the task explained in this section:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">RandomForest randomForest = new RandomForest();\n\nString[] parameters = new String[14];\n     \nparameters[0] = \"-P\";\nparameters[1] = \"100\";\nparameters[2] = \"-I\";\nparameters[3] = \"100\";\nparameters[4] = \"-num-slots\";\nparameters[5] = \"1\";\nparameters[6] = \"-K\";\nparameters[7] = \"0\";\nparameters[8] = \"-M\";\nparameters[9] = \"1.0\";\nparameters[10] = \"-V\";\nparameters[11] = \"0.001\";\nparameters[12] = \"-S\";\nparameters[13] = \"1\";\n   \nrandomForest.setOptions(parameters);<\/code><\/pre>\n<\/div>\n<p>Once the random forest arguments have been defined, they must be entered into our model. The next step in our program is to train our model using our training dataset. Finally, we complete our code by evaluating the results of our model after it has been prepared using our diabetes dataset.<\/p>\n<p>The following code was used to conduct the task explained in this section:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">randomForest.setOptions(parameters);\n\nrandomForest.buildClassifier(datasetInstances);\n\nEvaluation evaluation = new Evaluation(datasetInstances);\n\nevaluation.crossValidateModel(randomForest, datasetInstances, numFolds, new Random(1));\n\nSystem.out.println(evaluation.toSummaryString(\"nResultsn======n\", true));<\/code><\/pre>\n<\/div>\n<h2>Compile and Run the Code<\/h2>\n<p>To compile our Java program, we will navigate to our <strong>GridDB<\/strong> folder and run it from the command line. The <code>javac<\/code> command should be used to run the compiler to construct our code. After compiling our program, we will run it with the <code>java<\/code> command.<\/p>\n<p>The following commands are a representation of our explanation:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">javac gsSample\/randomForest.java\n\njava gsSample\/randomForest.java<\/code><\/pre>\n<\/div>\n<h2>Conclusion &amp; Results<\/h2>\n<p>The final section of our article is the understanding of our results. To easily digest how well our random forest performed in predicting if a patient has diabetes or not, we will have to filter out the random-forest output. The main number we shall focus on in this section is the model accuracy. This number represents how well our model can perform in a real-world scenario. Our random forest diabetes predictor reached an accuracy of <strong>90&#46;05%<\/strong>. To explain, this is considered a very high accuracy as it is above the 90% limit. For future development, our model will fully use the <strong>GridDB<\/strong> database as it provides an easy input-output data interface and an incredible speed of data retrieval.<\/p>\n<p>The following summary output is a representation of our results and evaluation information:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">=== Run information ===\n\nRelation:     diabetes\nInstances:    768\nAttributes:   9\n              Pregnancies\n              Glucose\n              BloodPressure\n              SkinThickness\n              Insulin\n              BMI\n              DiabetesPedigreeFunction\n              Age\n              Outcome\nTest mode:    10-fold cross-validation\n\n=== Classifier model (full training set) ===\n\nRandomForest\n\nBagging with 100 iterations and base learner\n\nTime taken to build model: 0.13 seconds\n\n=== Summary ===\n\nCorrectly Classified Instances              90.05%\nIncorrectly Classified Instances            9.95%  \nMean absolute error                         0.0995\nRelative absolute error                     9.51%\nTotal Number of Instances                   768<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of machine learning models to create a predictive system. This model will use random-forest to predict if patients have diabetes or not. The article will outline the requirements needed to [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":28909,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Diabetes Prediction using Machine Learning, Java, and GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Diabetes Prediction using Machine Learning, Java, and GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-19T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:56:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Diabetes Prediction using Machine Learning, Java, and GridDB\",\"datePublished\":\"2022-11-19T08:00:00+00:00\",\"dateModified\":\"2025-11-13T20:56:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\"},\"wordCount\":1177,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\",\"name\":\"Diabetes Prediction using Machine Learning, Java, and GridDB | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg\",\"datePublished\":\"2022-11-19T08:00:00+00:00\",\"dateModified\":\"2025-11-13T20:56:17+00:00\",\"description\":\"This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg\",\"contentUrl\":\"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg\",\"width\":1280,\"height\":853},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/griddb.net\/en\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Diabetes Prediction using Machine Learning, Java, and GridDB | GridDB: Open Source Time Series Database for IoT","description":"This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Diabetes Prediction using Machine Learning, Java, and GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of","og_url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-11-19T08:00:00+00:00","article_modified_time":"2025-11-13T20:56:17+00:00","og_image":[{"width":1280,"height":853,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"griddb-admin","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Diabetes Prediction using Machine Learning, Java, and GridDB","datePublished":"2022-11-19T08:00:00+00:00","dateModified":"2025-11-13T20:56:17+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/"},"wordCount":1177,"commentCount":0,"publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/","name":"Diabetes Prediction using Machine Learning, Java, and GridDB | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg","datePublished":"2022-11-19T08:00:00+00:00","dateModified":"2025-11-13T20:56:17+00:00","description":"This article will cover the health care concern of diabetes that is driving the lifestyle of many people worldwide. This article will cover the usage of","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/blog\/diabetes-prediction-using-machine-learning-java-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg","contentUrl":"\/wp-content\/uploads\/2022\/08\/blood-sugar_1280x853.jpeg","width":1280,"height":853},{"@type":"WebSite","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#website","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/griddb.net\/en\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46728"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46728\/revisions"}],"predecessor-version":[{"id":51400,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/posts\/46728\/revisions\/51400"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media\/28909"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}