{"id":50777,"date":"2022-01-08T00:00:00","date_gmt":"2022-01-08T08:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/"},"modified":"2025-11-14T07:55:06","modified_gmt":"2025-11-14T15:55:06","slug":"linear-regression-with-java","status":"publish","type":"post","link":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/","title":{"rendered":"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30"},"content":{"rendered":"<h3>\u306f\u3058\u3081\u306b<\/h3>\n<p>\u7dda\u5f62\u56de\u5e30\u306f\u3001<em>\u5358\u7d14\u7dda\u5f62\u56de\u5e30<\/em>\u3068\u3082\u547c\u3070\u308c\u3001\u5f93\u5c5e\u5909\u6570\u30681\u3064\u306e\u72ec\u7acb\u5909\u6570\u306e\u9593\u306e\u95a2\u4fc2\u3092\u30e2\u30c7\u30eb\u5316\u3059\u308b\u56de\u5e30\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u3059\u3002\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u306f\u3001\u7dda\u5f62\u307e\u305f\u306f\u50be\u659c\u3057\u305f\u76f4\u7dda\u3067\u3042\u308b\u95a2\u4fc2\u3092\u793a\u3059\u306e\u3067\u3001<em>\u5358\u7d14\u7dda\u5f62\u56de\u5e30<\/em>\u3068\u3044\u3046\u540d\u524d\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u7dda\u5f62\u56de\u5e30\u3067\u306f\u3001\u5f93\u5c5e\u5909\u6570\u306f\u5b9f\u6570\u307e\u305f\u306f\u9023\u7d9a\u5024\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u72ec\u7acb\u5909\u6570\u306f\u9023\u7d9a\u5024\u307e\u305f\u306f\u30ab\u30c6\u30b4\u30ea\u5024\u3067\u6e2c\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5358\u7d14\u7dda\u5f62\u56de\u5e30\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306e\u4e3b\u306a\u76ee\u7684\u306f\u4ee5\u4e0b\u306e2\u3064\u3067\u3059\u3002<\/p>\n<ul>\n<li>\n<p>\u8077\u6b74\u3068\u7d66\u4e0e\u3001\u53ce\u5165\u3068\u652f\u51fa\u306a\u3069\u30012\u3064\u306e\u4e0e\u3048\u3089\u308c\u305f\u5909\u6570\u306e\u9593\u306e\u95a2\u4fc2\u3092\u30e2\u30c7\u30eb\u5316\u3057\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p>\u65b0\u3057\u3044\u30aa\u30d6\u30b6\u30d9\u30fc\u30b7\u30e7\u30f3\u3092\u4e88\u6e2c\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u30011\u5e74\u9593\u306e\u6295\u8cc7\u306b\u57fa\u3065\u3044\u3066\u4f01\u696d\u304c\u751f\u307f\u51fa\u3059\u53ce\u76ca\u984d\u3001\u6c17\u6e29\u306b\u57fa\u3065\u304f\u5929\u6c17\u4e88\u5831\u3001\u306a\u3069\u3067\u3059\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5358\u7d14\u306a\u7dda\u5f62\u56de\u5e30\u306f\u3001\u4ee5\u4e0b\u306e\u5f0f\u3067\u8868\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">Y = a + bX<\/code><\/pre>\n<\/div>\n<p>\u3053\u3053\u3067\u3001<\/p>\n<p>Y- \u306f\u5f93\u5c5e\u5909\u6570\u3067\u3042\u308b\u3002<\/p>\n<p>a- \u306f\u56de\u5e30\u76f4\u7dda\u306e\u5207\u7247\u3067\u3042\u308b\u3002<\/p>\n<p>b- \u306f\u76f4\u7dda\u306e\u50be\u304d\u3002<\/p>\n<p>X- \u306f\u72ec\u7acb\u5909\u6570\u3002<\/p>\n<h2>Java\u3067\u7dda\u5f62\u56de\u5e30\u3092\u5b9f\u88c5\u3059\u308b<\/h2>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001Java\u3067\u5358\u7d14\u56de\u5e30\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306f\u3001\u5f93\u5c5e\u5909\u6570\u3067\u3042\u308b <code>salary<\/code> \u3068\u72ec\u7acb\u5909\u6570\u3067\u3042\u308b <code>experience<\/code> \u306e2\u3064\u306e\u5909\u6570\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u304b\u3089\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u3053\u306e\u30e2\u30c7\u30eb\u3092\u4f7f\u3063\u3066\u3001\u500b\u4eba\u306e\u7d4c\u9a13\u306b\u57fa\u3065\u3044\u3066\u305d\u306e\u4eba\u306e\u7d66\u6599\u3092\u4e88\u6e2c\u3057\u307e\u3059\u3002<\/p>\n<h3>GridDB\u306b\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3059\u308b<\/h3>\n<p>\u30c7\u30fc\u30bf\u306fCSV\u30d5\u30a1\u30a4\u30eb <code>Salary_Data.csv<\/code> \u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u3092GridDB\u30b3\u30f3\u30c6\u30ca\u306b\u66f8\u304d\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002CSV\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u76f4\u63a5\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001GridDB\u3092\u5229\u7528\u3059\u308b\u3068\u30af\u30a8\u30ea\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306b\u306f\u3001<code>yearsExperience<\/code> \u3068 <code>salary<\/code> \u3068\u3044\u30462\u3064\u306e\u30ab\u30e9\u30e0\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u5fc5\u8981\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">import java.io.IOException;\nimport java.util.Collection;\nimport java.util.Properties;\nimport java.util.Scanner;\nimport java.io.File;\n\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>\u6b21\u306b\u3001\u4f7f\u7528\u3059\u308b GridDB \u30b3\u30f3\u30c6\u30ca\u3092\u8868\u3059\u9759\u7684 Java \u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">public static class ExperienceSalary {\n     @RowKey float yearsExperience;\n     Double  salary; \n}    <\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u306e\u30af\u30e9\u30b9\u306f\u30012\u3064\u306e\u30ab\u30e9\u30e0\u3092\u6301\u3064SQL\u30c6\u30fc\u30d6\u30eb\u3068\u540c\u7b49\u3067\u3059\u30022\u3064\u306e\u5909\u6570\u306f\u3001GridDB\u30b3\u30f3\u30c6\u30ca\u306e\u30ab\u30e9\u30e0\u3092\u8868\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001Java \u3092\u4f7f\u3063\u3066 GridDB \u306b\u63a5\u7d9a\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001GridDB \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u969b\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">        Properties props = new Properties();\n        props.setProperty(\"notificationAddress\", \"239.0.0.1\");\n        props.setProperty(\"notificationPort\", \"31999\");\n        props.setProperty(\"clusterName\", \"defaultCluster\");\n        props.setProperty(\"user\", \"admin\");\n        props.setProperty(\"password\", \"admin\");\n        GridStore store = GridStoreFactory.getInstance().getGridStore(props);<\/code><\/pre>\n<\/div>\n<p>GridDB\u306e<code>ExperienceSalary<\/code>\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u7528\u3059\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">Collection&lt;String, ExperienceSalary> coll = store.putCollection(\"col01\", ExperienceSalary.class);<\/code><\/pre>\n<\/div>\n<p>\u30b3\u30f3\u30c6\u30ca\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3057\u3001<code>coll<\/code>\u3068\u3044\u3046\u540d\u524d\u3092\u4ed8\u3051\u307e\u3057\u305f\u3002\u3053\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u540d\u3092\u4f7f\u3063\u3066\u3001\u30b3\u30f3\u30c6\u30ca\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001<code>Salary_Data.csv<\/code> \u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3001GridDB \u30b3\u30f3\u30c6\u30ca\u306b\u66f8\u304d\u8fbc\u3093\u3067\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n                File file1 = new File(\"Salary_Data.csv\");\n                Scanner sc = new Scanner(file1);\n                String data = sc.next();\n \n                while (sc.hasNext()){\n                        String scData = sc.next();\n                        String dataList[] = scData.split(\",\");\n                        String yearsExperience = dataList[0];\n                        String salary = dataList[1];\n\n                        ExperienceSalary es = new ExperienceSalary();\n\n                        es.yearsExperience = Float.parseFloat(yearsExperience);\n                        es.salary = Double.parseDouble(salary);\n\n                        coll.append(es);\n                 }<\/code><\/pre>\n<\/div>\n<p>\u9759\u7684\u30af\u30e9\u30b9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001<code>es<\/code> \u3068\u3044\u3046\u540d\u524d\u3092\u4ed8\u3051\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u3001GridDB \u30b3\u30f3\u30c6\u30ca\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>GridDB\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u5b9f\u88c5\u3059\u308b\u305f\u3081\u306b\u30c7\u30fc\u30bf\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001GridDB\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n            Query&lt;experiencesalary> query = coll.query(\"select *\");\n            RowSet&lt;experiencesalary> rs = query.fetch(false);\n            RowSet res = query.fetch();\n  <\/code><\/pre>\n<\/div>\n<p>\u3053\u3053\u3067\u306f\u3001<code>select *<\/code>\u30af\u30a8\u30ea\u3092\u4f7f\u3063\u3066\u3001GridDB\u30b3\u30f3\u30c6\u30ca\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u69cb\u7bc9<\/h3>\n<p>\u3055\u3066\u3001\u30c7\u30fc\u30bf\u304c\u63c3\u3063\u305f\u306e\u3067\u3001\u3044\u3088\u3044\u3088\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e2\u3064\u306e\u5909\u6570\u306e\u9593\u306b\u76f8\u95a2\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u6559\u3048\u3066\u304f\u308c\u308b\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001\u4f7f\u7528\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">import java.io.IOException;\n\nimport weka.classifiers.Evaluation;\nimport weka.classifiers.Classifier;\nimport weka.core.Instance;\nimport weka.core.Instances;\nimport weka.core.converters.ArffLoader; \n\nimport java.io.BufferedReader;\nimport java.io.FileReader;<\/code><\/pre>\n<\/div>\n<p>\u6b21\u306b\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u7528\u306e\u30d0\u30c3\u30d5\u30a1\u30fc\u30c9\u30ea\u30fc\u30c0\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3082\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">            BufferedReader bufferedReader\n                = new BufferedReader(\n                    new FileReader(res));\n \n            \/\/ Create dataset instances\n            Instances datasetInstances\n                = new Instances(bufferedReader);<\/code><\/pre>\n<\/div>\n<p>\u305d\u308c\u3067\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f7f\u3063\u3066\u7dda\u5f62\u56de\u5e30\u5206\u985e\u5668\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n        datasetInstances.setClassIndex(datasetInstances.numAttributes()-1);\n        Classifier classifier = new weka.classifiers.functions.LinearRegression();\n        classifier.buildClassifier(datasetInstances);<\/code><\/pre>\n<\/div>\n<h2>\u4e88\u6e2c\u3092\u3059\u308b<\/h2>\n<p>\u3055\u3066\u3001\u30e2\u30c7\u30eb\u306e\u6e96\u5099\u304c\u3067\u304d\u305f\u306e\u3067\u3001\u3053\u308c\u3092\u4f7f\u3063\u3066\u4e88\u6e2c\u3092\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4eca\u56de\u306f\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u6700\u5f8c\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7d66\u6599\u3092\u4e88\u6e2c\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-java\">\n        \/\/ Predicting the salary \n        Instance predSalary = datasetInstances.lastInstance();\n        double sal = classifier.classifyInstance(predSalary);\n        System.out.println(\"The salary is : \"+sal);<\/code><\/pre>\n<\/div>\n<h2>\u30e2\u30c7\u30eb\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u3068\u5b9f\u884c<\/h2>\n<p>\u30e2\u30c7\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5b9f\u884c\u3059\u308b\u306b\u306f\u3001Weka API \u304c\u5fc5\u8981\u3067\u3059\u3002\u4ee5\u4e0b\u306eURL\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code>http:\/\/www.java2s.com\/Code\/Jar\/w\/weka.htm\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001<code>gsadm<\/code> \u30e6\u30fc\u30b6\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002\u4f5c\u6210\u3057\u305f <code>.java<\/code> \u30d5\u30a1\u30a4\u30eb\u3092 GridDB \u306e <code>bin<\/code> \u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3001\u4ee5\u4e0b\u306e\u30d1\u30b9\u306b\u914d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n<pre><code>\/griddb_4.6.0-1_amd64\/usr\/griddb-4.6.0\/bin\n<\/code><\/pre>\n<p>\u6b21\u306b\u3001Linux\u7aef\u672b\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001gridstore.jar\u30d5\u30a1\u30a4\u30eb\u306e\u30d1\u30b9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">export CLASSPATH=$CLASSPATH:\/home\/osboxes\/Downloads\/griddb_4.6.0-1_amd64\/usr\/griddb-4.6.0\/bin\/gridstore.jar<\/code><\/pre>\n<\/div>\n<p>\u6b21\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066 <code>.java<\/code> \u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">javac -cp weka-3-7-0\/weka.jar LinearRegression.java<\/code><\/pre>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u751f\u6210\u3055\u308c\u305f .class \u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-sh\">java -cp .:weka-3-7-0\/weka.jar LinearRegression<\/code><\/pre>\n<\/div>\n<p>\u3053\u306e\u30e2\u30c7\u30eb\u306f<code>122017.00<\/code>\u3092\u8fd4\u3057\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u306f\u305d\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u5b9f\u969b\u306e\u7d66\u4e0e\u3001\u3064\u307e\u308a<code>121872.00<\/code>\u306b\u975e\u5e38\u306b\u8fd1\u3044\u3082\u306e\u3067\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u7dda\u5f62\u56de\u5e30\u306f\u3001\u5358\u7d14\u7dda\u5f62\u56de\u5e30\u3068\u3082\u547c\u3070\u308c\u3001\u5f93\u5c5e\u5909\u6570\u30681\u3064\u306e\u72ec\u7acb\u5909\u6570\u306e\u9593\u306e\u95a2\u4fc2\u3092\u30e2\u30c7\u30eb\u5316\u3059\u308b\u56de\u5e30\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3067\u3059\u3002\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u306f\u3001\u7dda\u5f62\u307e\u305f\u306f\u50be\u659c\u3057\u305f\u76f4\u7dda\u3067\u3042\u308b\u95a2\u4fc2\u3092\u793a\u3059\u306e\u3067\u3001\u5358\u7d14\u7dda\u5f62\u56de\u5e30\u3068\u3044\u3046\u540d\u524d\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u7dda\u5f62 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":49358,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1005],"tags":[],"class_list":["post-50777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1005"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30 | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"\u306f\u3058\u3081\u306b\" \/>\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.net\/ja\/\u672a\u5206\u985e\/linear-regression-with-java\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30 | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"\u306f\u3058\u3081\u306b\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/linear-regression-with-java\/\" \/>\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-01-08T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-14T15:55:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/griddb.net\/wp-content\/uploads\/2021\/12\/linear.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1160\" \/>\n\t<meta property=\"og:image:height\" content=\"653\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\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=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30\",\"datePublished\":\"2022-01-08T08:00:00+00:00\",\"dateModified\":\"2025-11-14T15:55:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/\"},\"wordCount\":33,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2021\/12\/linear.png\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/\",\"url\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/\",\"name\":\"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30 | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2021\/12\/linear.png\",\"datePublished\":\"2022-01-08T08:00:00+00:00\",\"dateModified\":\"2025-11-14T15:55:06+00:00\",\"description\":\"\u306f\u3058\u3081\u306b\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2021\/12\/linear.png\",\"contentUrl\":\"\/wp-content\/uploads\/2021\/12\/linear.png\",\"width\":1160,\"height\":653},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/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:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/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:\/\/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:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/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:\/\/griddb.net\/ja\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30 | GridDB: Open Source Time Series Database for IoT","description":"\u306f\u3058\u3081\u306b","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.net\/ja\/\u672a\u5206\u985e\/linear-regression-with-java\/","og_locale":"ja_JP","og_type":"article","og_title":"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30 | GridDB: Open Source Time Series Database for IoT","og_description":"\u306f\u3058\u3081\u306b","og_url":"https:\/\/griddb.net\/ja\/\u672a\u5206\u985e\/linear-regression-with-java\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-01-08T08:00:00+00:00","article_modified_time":"2025-11-14T15:55:06+00:00","og_image":[{"width":1160,"height":653,"url":"https:\/\/griddb.net\/wp-content\/uploads\/2021\/12\/linear.png","type":"image\/png"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"\u57f7\u7b46\u8005":"griddb-admin","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"2\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30","datePublished":"2022-01-08T08:00:00+00:00","dateModified":"2025-11-14T15:55:06+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/"},"wordCount":33,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2021\/12\/linear.png","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/","url":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/","name":"Java\u306b\u3088\u308b\u7dda\u5f62\u56de\u5e30 | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2021\/12\/linear.png","datePublished":"2022-01-08T08:00:00+00:00","dateModified":"2025-11-14T15:55:06+00:00","description":"\u306f\u3058\u3081\u306b","inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/griddb.net\/ja\/%e6%9c%aa%e5%88%86%e9%a1%9e\/linear-regression-with-java\/#primaryimage","url":"\/wp-content\/uploads\/2021\/12\/linear.png","contentUrl":"\/wp-content\/uploads\/2021\/12\/linear.png","width":1160,"height":653},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/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:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/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:\/\/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:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/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:\/\/griddb.net\/ja\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50777","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/comments?post=50777"}],"version-history":[{"count":1,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50777\/revisions"}],"predecessor-version":[{"id":51611,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/posts\/50777\/revisions\/51611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media\/49358"}],"wp:attachment":[{"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/media?parent=50777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/categories?post=50777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/griddb.net\/ja\/wp-json\/wp\/v2\/tags?post=50777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}