{"id":16379336,"url":"https://github.com/retrooper/bigdata","last_synced_at":"2025-09-19T12:23:27.920Z","repository":{"id":251992716,"uuid":"839003142","full_name":"retrooper/bigdata","owner":"retrooper","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-10T19:04:50.000Z","size":4953,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-06T22:37:37.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/retrooper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-06T19:13:17.000Z","updated_at":"2025-03-02T19:48:26.000Z","dependencies_parsed_at":"2024-08-27T18:30:24.674Z","dependency_job_id":"9490332b-113a-4064-9104-41e64f24d9ea","html_url":"https://github.com/retrooper/bigdata","commit_stats":null,"previous_names":["retrooper/bigdata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/retrooper/bigdata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrooper%2Fbigdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrooper%2Fbigdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrooper%2Fbigdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrooper%2Fbigdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retrooper","download_url":"https://codeload.github.com/retrooper/bigdata/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrooper%2Fbigdata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275935164,"owners_count":25555528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T03:48:13.954Z","updated_at":"2025-09-19T12:23:27.894Z","avatar_url":"https://github.com/retrooper.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *bigdata*\nEasy to use Machine Learning library written in Java, powered by OpenCV.\n\n## Linear Regression Algorithm\n![image](https://github.com/user-attachments/assets/b7c6386d-448c-41f1-a976-ccfd441b00e1)\n\n### Implementing Linear-Regression\n```java\n        //Data samples\n        float[] input = new float[]{\n                -1f, 0f, 1f, 2f\n        };\n        //Supervised output\n        float[] output = new float[]{\n                -2f, 0f, 2f, 4f\n        };\n\n        //Specify the dataset\n        LabeledDataset2D function = new LabeledDataset2D(input, output);\n        //Specify the learning algorithm (linear regression)\n        Supplier\u003cLearningAlgorithm\u003cFloat\u003e\u003e dataSupplier = () -\u003e LinearRegressionAlgorithm.build(function);\n        TrainingModel\u003cFloat\u003e trainingModel = new TrainingModel\u003c\u003e();\n        //Train the model\n        ProductionModel\u003cFloat\u003e trainedModel = trainingModel.train(dataSupplier);\n\n        Scanner scanner = new Scanner(System.in);\n        while (true) {\n            System.out.println(\"What X value should we predict based on the data?\");\n            String line = scanner.nextLine();\n            try {\n                float x = (float)Double.parseDouble(line);\n                //Predict with the model.\n                System.out.println(\"X: \" + x + \", y: \" + trainedModel.predict(x));\n            }\n            catch (Exception exception) {\n                break;\n            }\n        }\n```\n\n## K-Means Clustering Algorithm\n![image](https://github.com/user-attachments/assets/7a105f4c-fa4b-459a-939b-5c745e031ee9)\n\n### Implementing K-Means Clustering Algorithm\n```java\n        //Unsupervised data, we expect to cluster\n        float[] input = new float[]{\n                1.1f, 1.1f, 1.1f, 1.4f, 3f, 3.2f, 3.3f, 3.4f, 5f, 5f, 5f\n        };\n        //Dataset\n        UnlabeledDataset1D function = new UnlabeledDataset1D(input);\n        //Learning algorithm with 3 clusters (groups), with 5 iterations\n        Supplier\u003cLearningAlgorithm\u003cNDimensionalPoint\u003e\u003e dataSupplier = () -\u003e KMeansClusteringAlgorithm.build(3, function, 5);\n        TrainingModel\u003cNDimensionalPoint\u003e trainingModel = new TrainingModel\u003c\u003e();\n        ProductionModel\u003cNDimensionalPoint\u003e trainedModel = trainingModel.train(dataSupplier);\n\n        Scanner scanner = new Scanner(System.in);\n        while (true) {\n            System.out.println(\"What cluster should we put X in, good grades (1), mid grades (2), bad grades (3)\");\n            String line = scanner.nextLine();\n            try {\n                float x = (float) Double.parseDouble(line);\n                //Predict with the model\n                System.out.println(\"X: \" + x + \" in cluster: \" + trainedModel.predict(new NDimensionalPoint(x)));\n            } catch (Exception exception) {\n                break;\n            }\n        }\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretrooper%2Fbigdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretrooper%2Fbigdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretrooper%2Fbigdata/lists"}