{"id":46805,"date":"2024-07-04T00:00:00","date_gmt":"2024-07-04T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/normalization\/"},"modified":"2025-11-13T12:57:02","modified_gmt":"2025-11-13T20:57:02","slug":"normalization","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/normalization\/","title":{"rendered":"Normalization in Java"},"content":{"rendered":"<p>In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB.<\/p>\n<p>Source code for this blog can be found on our Github page: https:\/\/github.com\/griddbnet\/Blogs<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">$ git clone https:\/\/github.com\/griddbnet\/Blogs.git --branch normalization<\/code><\/pre>\n<\/div>\n<p>Before we get started, Let&#8217;s understand normalization first.<\/p>\n<h2>What is Normalization?<\/h2>\n<p>Normalization is a commonly used data preparation technique in Machine Learning that changes the values of columns in the dataset using a common scale. Normalization is required when a range of characteristics are present in the dataset.<\/p>\n<p>In our project, we&#8217;re going to use the dataset <code>house.csv<\/code> that looks something like this:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nhousesize,lotsize,bedrooms,granite,bathroom,sellingprice\n3529,9191,6,0,0,205000 \n3247,10061,5,1,1,224900 \n4032,10150,5,0,1,197900 \n2397,14156,4,1,0,189900\n2200,9600,4,0,1,195000\n3536,19994,6,1,1,325000\n2983,9365,5,0,1,230000<\/code><\/pre>\n<\/div>\n<p>You can see that the dataset contains large numbers with different ranges, making it difficult to perform data analytics operations.<\/p>\n<p>With normalization, we can simplify this dataset by changing the column values on a common scale, such as ranging column values between 0 and 1. Looks something like this.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nhousesize,lotsize,bedrooms,granite,bathroom,sellingprice\n0.571507,0.080533,0.5,1,1,224900\n0.107533,0.459595,0,1,0,189900\n0.729258,1,1,1,1,325000\n0.725437,0,1,0,0,205000\n1,0.088772,0.5,0,1,197900\n0,0.03786,0,0,1,195000\n0.427402,0.016107,0.5,0,1,230000<\/code><\/pre>\n<\/div>\n<p>You may notice that the column <code>sellingprice<\/code> remains unchanged. This is because the classifier must know which is our outcome variable.<\/p>\n<p>That&#8217;s why we set the column <code>sellingprice<\/code> as our class index for the dataset before passing it to the classifier. You will observe it practically later in this article.<\/p>\n<p>The following formula defines normalization mathematically.<\/p>\n<p>Xn = (X &#8211; Xmin) \/ (Xmax &#8211; Xmin)<\/p>\n<p>Where,<br \/>\nXn = Normalized value.<br \/>\nXmin = Minimum value of a feature.<br \/>\nXmax = Maximum value of a feature.<\/p>\n<h2>Types of Normalization<\/h2>\n<p>Many types of normalization are available in machine learning. But the following types are widely used:<\/p>\n<p><strong>Min-Max Scaling:<\/strong> This type of normalization subtracts the minimum value from the highest value of each column and divides it by the range. Each new column has a minimum value of 0 and a maximum value of 1.<\/p>\n<p><strong>Standardization Scaling:<\/strong> Also known as Z-score normalization centers a variable at zero and standardizes the variance at one. It first subtracts the mean of each observation and then divides it by the standard deviation.<\/p>\n<p>That&#8217;s enough for the theory. Let&#8217;s dive into something practical.<\/p>\n<h2>How to use Normalization?<\/h2>\n<h2>Project Setup<\/h2>\n<p>Our project implements a basic level of normalization in Java and GridDB. Here is the project organization.<\/p>\n<p>To run this project, your system should have:<br \/>\n&#8211; Java (Latest version)<br \/>\n&#8211; GridDB<\/p>\n<h3>Required JAR files<\/h3>\n<p>We need two JAR files <code>gridstore-5.5.0.jar<\/code> and <code>weka-3.7.0.jar<\/code>. Here, <code>gridstore-5.5.0.jar<\/code> is an official library for GridDB, and <code>weka-3.7.0.jar<\/code> is a Machine Learning library used for data analysis.<\/p>\n<p>Download the Weka JAR from the following URL:<\/p>\n<p><a href=\"http:\/\/www.java2s.com\/Code\/Jar\/w\/weka.htm\">http:\/\/www.java2s.com\/Code\/Jar\/w\/weka.htm<\/a><\/p>\n<p>Download the gridstore.jar from here:<\/p>\n<p><a href=\"https:\/\/mvnrepository.com\/artifact\/com.github.griddb\/gridstore-jdbc\/5.5.0\">https:\/\/mvnrepository.com\/artifact\/com.github.griddb\/gridstore-jdbc\/5.5.0<\/a><\/p>\n<h3>Import Packages<\/h3>\n<p>For this project, we need some basic Java packages, such as:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nimport java.util.Properties;\nimport java.util.Scanner;\nimport java.io.File;\nimport java.io.Reader;\nimport java.io.StringReader;<\/code><\/pre>\n<\/div>\n<p>Include the following packages to connect and operate GridDB:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nimport com.toshiba.mwcloud.gs.Collection;\nimport com.toshiba.mwcloud.gs.GSException;\nimport com.toshiba.mwcloud.gs.GridStore;\nimport com.toshiba.mwcloud.gs.GridStoreFactory;\nimport com.toshiba.mwcloud.gs.Query;\nimport com.toshiba.mwcloud.gs.RowKey;\nimport com.toshiba.mwcloud.gs.RowSet;<\/code><\/pre>\n<\/div>\n<p>For data analysis, include these packages from Weka:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nimport weka.classifiers.Evaluation;\nimport weka.classifiers.functions.LinearRegression;\nimport weka.core.Instances;\nimport weka.filters.Filter;\nimport weka.filters.unsupervised.attribute.Normalize;<\/code><\/pre>\n<\/div>\n<p>Well, that&#8217;s the initial step.<\/p>\n<p>Let&#8217;s move on to our next step.<\/p>\n<h2>Creating a Class for Storing Data<\/h2>\n<p>Our project stores data in a GridDB container. So, we need to define the container schema as a static class:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nstatic class House {\n    @RowKey int housesize;\n    int lotsize;\n    int bedrooms;\n    int granite;\n    int bathroom;\n    int sellingprice;\n}<\/code><\/pre>\n<\/div>\n<p>The static class <code>House<\/code> consists of six integer-type columns with a <code>RowKey<\/code> <code>housesize<\/code>.<\/p>\n<h2>Creating a GridDB Connection<\/h2>\n<p>We have the schema class ready. It&#8217;s time to connect our program with GridDB.<\/p>\n<p>For creating GridDB connection, we have to initiate a <code>Properties<\/code> instance defining the credentials for GridDB installation. Have a look at the following code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nProperties props = new Properties();\nprops.setProperty(\"notificationMember\", \"127.0.0.1:10001\");\nprops.setProperty(\"clusterName\", \"myCluster\");\nprops.setProperty(\"user\", \"admin\");\nprops.setProperty(\"password\", \"admin\");\nGridStore store = GridStoreFactory.getInstance().getGridStore(props);<\/code><\/pre>\n<\/div>\n<p>You may need to change these connection specifics based on your GridDB installation.<\/p>\n<p>Once you have successfully created your connection, it&#8217;s time to create a collection.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nCollection coll = store.putCollection(\"House\", House.class);<\/code><\/pre>\n<\/div>\n<p>Here, we created a collection object <code>coll<\/code> for the container <code>House<\/code>.<\/p>\n<h2>Push Data to GridDB<\/h2>\n<p>Now we have our GridDB schema and our connection is ready to go.<\/p>\n<p>Let&#8217;s put some data to it,<\/p>\n<p>In this purpose, we will retrive data from the <code>house.csv<\/code> file and push them to GridDB. The following code block achieves this task,<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nFile file1 = new File(\"house.csv\");\nScanner scan = new Scanner(file1);\nString data = scan.next();\n\nwhile (scan.hasNext()){\n    String scanData = scan.next();\n    String dataList[] = scanData.split(\",\");\n    String housesize = dataList[0];\n    String lotsize = dataList[1];\n    String bedrooms = dataList[2];\n    String granite = dataList[3];\n    String bathroom = dataList[4];\n    String sellingprice = dataList[5];\n    \n    House hs = new House();\n    \n    hs.housesize = Integer.parseInt(housesize);\n    hs.lotsize = Integer.parseInt(lotsize);\n    hs.bedrooms = Integer.parseInt(bedrooms);\n    hs.granite = Integer.parseInt(granite);\n    hs.bathroom = Integer.parseInt(bathroom);\n    hs.sellingprice = Integer.parseInt(sellingprice);\n    coll.put(hs);\n}<\/code><\/pre>\n<\/div>\n<p>We created an object of our schema class <code>House<\/code> to push data to the container.<\/p>\n<h2>Retrieve Data from GridDB<\/h2>\n<p>Let&#8217;s pull data from the GridDB container and make the data available for analysis. Use the following code.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nQuery query = coll.query(\"select *\");\nRowSet<House> rs = query.fetch(false);<\/code><\/pre>\n<\/div>\n<p>Query data from GridDB is similar to general SQL queries. Here, we used the query <code>select *<\/code> to retrieve all the data from the GridDB container.<\/p>\n<p>We&#8217;ll save these data into a string for our next step.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nString datastr = \"@RELATION housenn@ATTRIBUTE houseSize NUMERICn@ATTRIBUTE lotSize NUMERICn@ATTRIBUTE bedrooms NUMERICn@ATTRIBUTE granite NUMERICn@ATTRIBUTE bathroom NUMERICn@ATTRIBUTE sellingPrice NUMERICnn@DATAn\";\n\nwhile (rs.hasNext()) {\nHouse hs = rs.next();\ndatastr = datastr + hs.housesize+\",\"+hs.lotsize+\",\"+hs.bedrooms+\",\"+hs.granite+\",\"+hs.bathroom+\",\"+hs.sellingprice+\"n\";\n}<\/code><\/pre>\n<\/div>\n<p>Notice that we initialize the string <code>datastr<\/code> with the <code>arff<\/code> file structure.<\/p>\n<p>Let&#8217;s see what the data looks like before normalization,<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nSystem.out.println(\"==== Before Normalization ===n\"+datastr);<\/code><\/pre>\n<\/div>\n<h2>Creating Weka Instances<\/h2>\n<p>We will use the Weka Machine Learning library for normalizing data. Hence, we need to convert our data into Weka Instances.<\/p>\n<p>Do you remember we stored data in the string <code>datastr<\/code> in our previous step?<\/p>\n<p>Yes, we&#8217;re going to pass that string in our Weka instances.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nReader dataString = new StringReader(datastr);\nInstances dataset = new Instances(dataString);\ndataset.setClassIndex(dataset.numAttributes()-1);<\/code><\/pre>\n<\/div>\n<p>The above code creates a Weka Instance.<\/p>\n<h2>Normalization<\/h2>\n<p>Let&#8217;s perform normalization to our dataset,<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nNormalize normalize = new Normalize();\nnormalize.setInputFormat(dataset);\nInstances newdata = Filter.useFilter(dataset, normalize);<\/code><\/pre>\n<\/div>\n<p>Next, we are going to visualize data after normalization<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nSystem.out.println(\"==== After Normalization ===n\"+newdata);<\/code><\/pre>\n<\/div>\n<p>Lastly, we just applied linear regression to our normalized data.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nLinearRegression lr = new LinearRegression();\nlr.buildClassifier(newdata);\nEvaluation lreval = new Evaluation(newdata);\nlreval.evaluateModel(lr, newdata);\nSystem.out.println(lreval.toSummaryString());<\/code><\/pre>\n<\/div>\n<p>That&#8217;s all about the project. Let&#8217;s test it.<\/p>\n<h2>Compile and Execute<\/h2>\n<p>If you aren&#8217;t using any IDE, you may need to include the JAR files through the classpath:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nexport CLASSPATH=$CLASSPATH:\/Home\/User\/Download\/gridstore.jar<\/code><\/pre>\n<\/div>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\nexport CLASSPATH=$CLASSPATH:\/Home\/User\/Download\/weka-3.7.0.jar<\/code><\/pre>\n<\/div>\n<p>These paths may differ based on your setup.<\/p>\n<p>Now, you can compile the code using this command:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\njavac NormalizationJava.java<\/code><\/pre>\n<\/div>\n<p>Then execute the code:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\njava NormalizationJava<\/code><\/pre>\n<\/div>\n<h2>Showing the Output<\/h2>\n<p>Running the code, you&#8217;ll have the following output:<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">\n==== Before Normalization ===\n@RELATION house\n\n@ATTRIBUTE houseSize NUMERIC\n@ATTRIBUTE lotSize NUMERIC\n@ATTRIBUTE bedrooms NUMERIC\n@ATTRIBUTE granite NUMERIC\n@ATTRIBUTE bathroom NUMERIC\n@ATTRIBUTE sellingPrice NUMERIC\n\n@DATA\n3247,10061,5,1,1,224900\n2397,14156,4,1,0,189900\n3536,19994,6,1,1,325000\n3529,9191,6,0,0,205000\n4032,10150,5,0,1,197900\n2200,9600,4,0,1,195000\n2983,9365,5,0,1,230000\n\n==== After Normalization ===\n@relation house-weka.filters.unsupervised.attribute.Normalize-S1.0-T0.0\n\n@attribute houseSize numeric\n@attribute lotSize numeric\n@attribute bedrooms numeric\n@attribute granite numeric\n@attribute bathroom numeric\n@attribute sellingPrice numeric\n\n@data\n0.571507,0.080533,0.5,1,1,224900\n0.107533,0.459595,0,1,0,189900\n0.729258,1,1,1,1,325000\n0.725437,0,1,0,0,205000\n1,0.088772,0.5,0,1,197900\n0,0.03786,0,0,1,195000\n0.427402,0.016107,0.5,0,1,230000\n\nCorrelation coefficient                  0.9945\nMean absolute error                   4053.821 \nRoot mean squared error               4578.4125\nRelative absolute error                 13.1339 %\nRoot relative squared error             10.51   %\nTotal Number of Instances                7     \n\nBUILD SUCCESSFUL (total time: 1 second)<\/code><\/pre>\n<\/div>\n<h2>Wrapping Up<\/h2>\n<p>That&#8217;s all for normalization in Java with GridDB.<\/p>\n<p>This article demonstrates applying normalization to the dataset for better analysis. As we mentioned, normalization is helpful when the dataset contains a range of characteristics.<\/p>\n<p>Finally, make sure you close the query, container, and the GridDB database.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\nquery.close();\ncoll.close();\nstore.close();<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github page: https:\/\/github.com\/griddbnet\/Blogs $ git clone https:\/\/github.com\/griddbnet\/Blogs.git &#8211;branch normalization Before we get started, Let&#8217;s understand normalization first. What is Normalization? Normalization is a commonly used data preparation technique in [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":30155,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46805","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>Normalization in Java | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Normalization in Java | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\" \/>\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=\"2024-07-04T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:57:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1536\" \/>\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:\/\/www.griddb.net\/en\/blog\/normalization\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Normalization in Java\",\"datePublished\":\"2024-07-04T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:57:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\"},\"wordCount\":913,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/normalization\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\",\"url\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\",\"name\":\"Normalization in Java | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/www.griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg\",\"datePublished\":\"2024-07-04T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:57:02+00:00\",\"description\":\"In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.griddb.net\/en\/blog\/normalization\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg\",\"width\":2560,\"height\":1536},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.griddb.net\/en\/#website\",\"url\":\"https:\/\/www.griddb.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:\/\/www.griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/www.griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.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:\/\/www.griddb.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:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.griddb.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:\/\/www.griddb.net\/en\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Normalization in Java | GridDB: Open Source Time Series Database for IoT","description":"In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github","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:\/\/www.griddb.net\/en\/blog\/normalization\/","og_locale":"en_US","og_type":"article","og_title":"Normalization in Java | GridDB: Open Source Time Series Database for IoT","og_description":"In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github","og_url":"https:\/\/www.griddb.net\/en\/blog\/normalization\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2024-07-04T07:00:00+00:00","article_modified_time":"2025-11-13T20:57:02+00:00","og_image":[{"width":2560,"height":1536,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg","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:\/\/www.griddb.net\/en\/blog\/normalization\/#article","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/"},"author":{"name":"griddb-admin","@id":"https:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Normalization in Java","datePublished":"2024-07-04T07:00:00+00:00","dateModified":"2025-11-13T20:57:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/"},"wordCount":913,"commentCount":0,"publisher":{"@id":"https:\/\/www.griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.griddb.net\/en\/blog\/normalization\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/","url":"https:\/\/www.griddb.net\/en\/blog\/normalization\/","name":"Normalization in Java | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/www.griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage"},"image":{"@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg","datePublished":"2024-07-04T07:00:00+00:00","dateModified":"2025-11-13T20:57:02+00:00","description":"In this blog post, we will demonstrate normalizing data for machine learning with Java and GridDB. Source code for this blog can be found on our Github","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.griddb.net\/en\/blog\/normalization\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.net\/en\/blog\/normalization\/#primaryimage","url":"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg","contentUrl":"\/wp-content\/uploads\/2024\/07\/normalization-in-java-griddb-project-strct-scaled.jpg","width":2560,"height":1536},{"@type":"WebSite","@id":"https:\/\/www.griddb.net\/en\/#website","url":"https:\/\/www.griddb.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:\/\/www.griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/www.griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.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:\/\/www.griddb.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:\/\/www.griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.griddb.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:\/\/www.griddb.net\/en\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46805"}],"version-history":[{"count":1,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46805\/revisions"}],"predecessor-version":[{"id":51467,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46805\/revisions\/51467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/30155"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}