{"id":28244930,"url":"https://github.com/waikato-datamining/djl-arff","last_synced_at":"2025-09-09T01:33:15.373Z","repository":{"id":290878329,"uuid":"975850095","full_name":"waikato-datamining/djl-arff","owner":"waikato-datamining","description":"Reading ARFF datasets using Deep Java Library (DJL).","archived":false,"fork":false,"pushed_at":"2025-07-28T23:54:54.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-29T01:24:41.711Z","etag":null,"topics":["arff","djl","weka"],"latest_commit_sha":null,"homepage":"","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/waikato-datamining.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-01T02:36:57.000Z","updated_at":"2025-07-28T23:54:58.000Z","dependencies_parsed_at":"2025-07-29T01:23:29.477Z","dependency_job_id":null,"html_url":"https://github.com/waikato-datamining/djl-arff","commit_stats":null,"previous_names":["waikato-datamining/djl-arff"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/waikato-datamining/djl-arff","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waikato-datamining%2Fdjl-arff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waikato-datamining%2Fdjl-arff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waikato-datamining%2Fdjl-arff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waikato-datamining%2Fdjl-arff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waikato-datamining","download_url":"https://codeload.github.com/waikato-datamining/djl-arff/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waikato-datamining%2Fdjl-arff/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274232026,"owners_count":25245856,"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-08T02:00:09.813Z","response_time":121,"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":["arff","djl","weka"],"created_at":"2025-05-19T08:14:28.962Z","updated_at":"2025-09-09T01:33:15.360Z","avatar_url":"https://github.com/waikato-datamining.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# djl-arff\nReading ARFF datasets using [Deep Java Library (DJL)](https://djl.ai/).\n\nRather than explicitly defining all the features and labels manually, \nthe dataset builder offers a number of methods that simplify specifying\nwhich columns are to be used as labels (i.e., class attributes/output variables) \nand which as features (i.e., input variables). It is also possible to\nspecify columns to ignore completely.\n\nWorks with DJL version 0.21.0 and later.\n\n\n## Usage\n\nBelow is an example of how to load the UCI datatset iris, using the last column \nas class attribute and only features that match `petal.*`:\n\n```java\nimport nz.ac.waikato.cms.adams.djl.dataset.ArffDataset;\nimport java.nio.file.Path;\n\nArffDataset dataset = ArffDataset.builder()\n            .optArffFile(Path.of(\"src/main/resources/iris.arff\"))\n            .setSampling(32, true)\n            .classIsLast()\n            .addMatchingFeatures(\"petal.*\")\n            .build();\n```\n\nHere is an overview of the available `ArffDataset.ArffBuilder` methods:\n\n* `dateColumnsAsNumeric()` - treat `DATE` attributes as `NUMERIC` instead of ignoring them\n* `stringColumnsAsNominal()` - treat `STRING` attributes as `NOMINAL` instead of ignoring them\n* `classIndex(int...)` - sets the 0-based index/indices of the column(s) to use as class attribute(s)  \n* `classIsFirst()` - uses the first column as class attribute\n* `classIsLast()` - uses the last column as class attribute\n* `addClassColumn(String...)` - adds the specified column(s) as class attribute(s)\n* `addIgnoredColumn(String...)` - specifies column(s) to be ignored\n* `ignoreMatchingColumns(String...)` - ignores columns that match the regexp(s)\n* `addAllFeatures()` - adds all columns as features that are neither ignored nor class attributes\n* `addMatchingFeatures(String...)` - adds all columns that match the regexp(s) that are neither ignored nor class attributes\n* `optArffFile(Path)` - the file to the ARFF file to load\n* `optArffUrl(String)` - the URL of the ARFF file to load\n* `fromJson` - can instantiate the builder from the JSON settings (as provided by `ArffDataset.toJson`)\n\nEither method of the builder instance must be called:\n* \n* `optArffFile`\n* `optArffUrl`\n* `fromJson` \n\n\n## Examples\n\nSome example classes for loading ARFF files:\n\n* [Load airline dataset](src/main/java/nz/ac/waikato/cms/adams/djl/dataset/example/LoadAirline.java)\n* [Load bodyfat dataset (adding columns automatically)](src/main/java/nz/ac/waikato/cms/adams/djl/dataset/example/LoadBodyfatAutomatic.java)\n* [Load bodyfat dataset (explicitly adding columns)](src/main/java/nz/ac/waikato/cms/adams/djl/dataset/example/LoadBodyfatExplicit.java)\n* [Load iris dataset](src/main/java/nz/ac/waikato/cms/adams/djl/dataset/example/LoadIris.java)\n* [Load iris dataset (STRING class attribute)](src/main/java/nz/ac/waikato/cms/adams/djl/dataset/example/LoadIrisString.java)\n\n\n## Maven\n\nAdd the following dependency to your `pom.xml`:\n\n```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003enz.ac.waikato.cms.adams\u003c/groupId\u003e\n      \u003cartifactId\u003edjl-arff\u003c/artifactId\u003e\n      \u003cversion\u003e0.0.2\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaikato-datamining%2Fdjl-arff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaikato-datamining%2Fdjl-arff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaikato-datamining%2Fdjl-arff/lists"}