{"id":22155926,"url":"https://github.com/citiususc/frog","last_synced_at":"2025-10-29T02:37:06.104Z","repository":{"id":68812656,"uuid":"42810990","full_name":"citiususc/frog","owner":"citiususc","description":"Java library for building Fuzzy Rule Bases","archived":false,"fork":false,"pushed_at":"2015-11-25T12:57:59.000Z","size":64,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-16T11:35:31.562Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citiususc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-20T11:45:01.000Z","updated_at":"2015-10-11T13:30:16.000Z","dependencies_parsed_at":"2023-03-13T20:27:17.905Z","dependency_job_id":null,"html_url":"https://github.com/citiususc/frog","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Ffrog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Ffrog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Ffrog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citiususc%2Ffrog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citiususc","download_url":"https://codeload.github.com/citiususc/frog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227660746,"owners_count":17800413,"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","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-12-02T02:33:17.683Z","updated_at":"2025-10-29T02:37:01.069Z","avatar_url":"https://github.com/citiususc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# frog\nThe frog library provides the implementation for the two most used types of fuzzy rule bases:\n* Mamdani: the outputs of the rules are fuzzy sets\n* TSK: the outputs of the rules are linear combinations of the inputs\n\nThe library is focused on real-valued systems, but categorical data, such as classification problems, can be simulated\nwith natural numbers.\n\nOnly one-labeled (i.e. only one fuzzy set) propositions are supported, with two different implementations:\n* Linguitisc: a general definition of the fuzzy sets that partitions the variables is used to indicate the label\n* Approximative: the definition of the label must be provided specifically for each proposition\n\n## Installation\nTo use the frog library you can use [JitPack](http://jitpack.io) adding the following repository to the pom.xml:\n```xml\n\u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\u003c/repository\u003e\n```\nand add this dependency for the last commit:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.citiususc\u003c/groupId\u003e\n    \u003cartifactId\u003efrog\u003c/artifactId\u003e\n    \u003cversion\u003ev1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor other dependency systems, please read the [JitPack documentation](https://jitpack.io/docs/).\n\n## Export/Import\nfrog uses [SnakeYAML](https://github.com/asomov/snakeyaml) for export/import to/from files using YAML format.\n\n## Quick Example\nThe following code is part of the tests provided in the library:\n\n```java\n// DataBase definition\nVariable[] inputs = new Variable[2];\ninputs[0] = new Variable(\"input1\", 0, 10);\ninputs[0].partition = PartitionBuilder.uniform(inputs[0], 2);\ninputs[1] = new Variable(\"input2\", -5, 5);\ninputs[1].partition = PartitionBuilder.uniform(inputs[1], 2);\nVariable[] outputs = new Variable[1];\noutputs[0] = new Variable(\"output\", -50, 50);\nDataBase db = new DataBase(inputs, outputs);\n\n// RuleBase definition\nRuleBase\u003cTSKRule\u003e rb = new RuleBase\u003c\u003e();\nfor (int i = 0; i \u003c inputs[0].partition.size(); i++) {\n    for (int j = 0; j \u003c inputs[1].partition.size(); j++) {\n        List\u003cLinguisticLabelProposition\u003e antecedents = new ArrayList\u003c\u003e();\n        antecedents.add(new LinguisticLabelProposition(0, i));\n        antecedents.add(new LinguisticLabelProposition(1, j));\n        List\u003cdouble[]\u003e consequents = new ArrayList\u003c\u003e();\n        consequents.add(new double[]{i, j, 0.2});\n        rb.add(new TSKRule(antecedents, consequents));\n    }\n}\n\n// Knowledge Base definition\nKnowledgeBase\u003cTSKRule\u003e kb = new KnowledgeBase\u003c\u003e(db, rb);\n\n// Inference\ndouble[] input = new double[]{2, 0};\nTSKInference.inference(this.kb, input);\n```\n\n## License\n\nThe frog library is licensed under the Apache 2 license, quoted below.\n\n    Copyright 2013 Centro de Investigación en Tecnoloxías da Información (CITIUS),\n    University of Santiago de Compostela (USC).\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n      http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Ffrog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitiususc%2Ffrog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitiususc%2Ffrog/lists"}