{"id":15039693,"url":"https://github.com/oracle/tribuo","last_synced_at":"2025-05-11T03:38:53.970Z","repository":{"id":36983201,"uuid":"272672735","full_name":"oracle/tribuo","owner":"oracle","description":"Tribuo - A Java machine learning library","archived":false,"fork":false,"pushed_at":"2025-05-07T15:17:36.000Z","size":10047,"stargazers_count":1316,"open_issues_count":33,"forks_count":186,"subscribers_count":57,"default_branch":"main","last_synced_at":"2025-05-08T23:44:59.142Z","etag":null,"topics":["classification","clustering","deep-learning","java","machine-learning","ml","nlp","regression"],"latest_commit_sha":null,"homepage":"https://tribuo.org","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/oracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/Roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-16T09:59:48.000Z","updated_at":"2025-05-07T15:17:34.000Z","dependencies_parsed_at":"2024-06-19T01:26:49.757Z","dependency_job_id":"b3d66a3b-ecc6-47a5-8cb8-67855281eec0","html_url":"https://github.com/oracle/tribuo","commit_stats":{"total_commits":279,"total_committers":24,"mean_commits":11.625,"dds":0.2437275985663082,"last_synced_commit":"ecab35767da382b7efea481f7a17fd0e6909133e"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Ftribuo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Ftribuo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Ftribuo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Ftribuo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/tribuo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253514441,"owners_count":21920330,"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":["classification","clustering","deep-learning","java","machine-learning","ml","nlp","regression"],"created_at":"2024-09-24T20:43:38.903Z","updated_at":"2025-05-11T03:38:53.952Z","avatar_url":"https://github.com/oracle.png","language":"Java","readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"50%\" alt=\"Tribuo Logo\" src=\"docs/img/Tribuo_Logo_Colour.png\" /\u003e\u003c/p\u003e\n\n# Tribuo - A Java prediction library (v4.3)\n\n[Tribuo](https://tribuo.org) is a machine learning library in Java that\nprovides multi-class classification, regression, clustering, anomaly detection\nand multi-label classification. Tribuo provides implementations of popular ML\nalgorithms and also wraps other libraries to provide a unified interface.\nTribuo contains all the code necessary to load, featurise and transform data.\nAdditionally, it includes the evaluation classes for all supported prediction\ntypes. Development is led by [Oracle Labs](https://labs.oracle.com)' Machine\nLearning Research Group;  we welcome community contributions.\n\nAll trainers are configurable using the\n[OLCUT](https://github.com/oracle/olcut) configuration system. This allows a\nuser to define a trainer in an xml or json file and repeatably build models.\nExample configurations for each of the supplied Trainers can be found in the\nconfig folder of each package. These configuration files can also be written in\njson or edn by using the appropriate OLCUT configuration dependency. Models and\ndatasets are serializable using Java serialization. \n\nAll models and evaluations include a serializable provenance object which\nrecords the creation time of the model or evaluation, the identity of the data\nand any transformations applied to it, as well as the hyperparameters of the\ntrainer. In the case of evaluations, this provenance information also includes\nthe specific model used. Provenance information can be extracted as JSON, or\nserialised directly using Java serialisation. For production deployments,\nprovenance information can be redacted and replaced with a hash to provide\nmodel tracking through an external system.  Many Tribuo models can be exported\nin ONNX format for deployment in other languages, platforms or cloud services.\n\nTribuo runs on Java 8+, and we test on LTS versions of Java along with the\nlatest release.  Tribuo itself is a pure Java library and is supported on all\nJava platforms;  however, some of our interfaces require native code and are\nthus supported only where there is native library support. We test on x86\\_64\narchitectures on Windows 10, macOS and Linux (RHEL/OL/CentOS 7+), as these are\nsupported platforms for the native libraries with which we interface. If you're\ninterested in another platform and wish to use one of the native library\ninterfaces (ONNX Runtime, TensorFlow, and XGBoost), we recommend reaching out\nto the developers of those libraries. Note the model card and reproducibility\npackages require Java 17, and as such are not part of the `tribuo-all` Maven\nCentral deployment.\n\n## Documentation\n\n* [Library Architecture](docs/Architecture.md)\n* [Package Overview](docs/PackageOverview.md)\n* Javadoc [4.3](https://tribuo.org/learn/4.3/javadoc), [4.2](https://tribuo.org/learn/4.2/javadoc), [4.1](https://tribuo.org/learn/4.1/javadoc/), [4.0](https://tribuo.org/learn/4.0/javadoc/)\n* [Helper Programs](docs/HelperPrograms.md)\n* [Developer Documentation](docs/Internals.md)\n* [Roadmap](docs/Roadmap.md)\n* [Frequently Asked Questions](docs/FAQs.md)\n\n## Tutorials\n\nTutorial notebooks, including examples of Classification, Clustering,\nRegression, Anomaly Detection, TensorFlow, document classification, columnar\ndata loading, working with externally trained models, and the configuration\nsystem, can be found in the [tutorials](tutorials). These use the\n[IJava](https://github.com/SpencerPark/IJava) Jupyter notebook kernel, and work\nwith Java 10+, except the model card \u0026 reproducibility tutorials which require\nJava 17.  To convert the tutorials' code back to Java 8, in most cases simply\nreplace the `var` keyword with the appropriate types.\n\n## Algorithms\n\n### General predictors\n\nTribuo includes implementations of several algorithms suitable for a wide range \nof prediction tasks:\n\n|Algorithm|Implementation|Notes|\n|---|---|---|\n|Bagging|Tribuo|Can use any Tribuo trainer as the base learner|\n|Random Forest|Tribuo|For both classification and regression|\n|Extra Trees|Tribuo|For both classification and regression|\n|K-NN|Tribuo|Includes options for several parallel backends, as well as a single threaded backend|\n|Neural Networks|TensorFlow|Train a neural network in TensorFlow via the Tribuo wrapper. Models can be deployed using the ONNX interface or the TF interface|\n\nThe ensembles and K-NN use a combination function to produce their output.\nThese combiners are prediction task specific, but the ensemble \u0026 K-NN \nimplementations are task agnostic. We provide voting and averaging combiners\nfor multi-class classification, multi-label classification and regression tasks.\n\n### Classification\n\nTribuo has implementations or interfaces for:\n\n|Algorithm|Implementation|Notes|\n|---|---|---|\n|Linear models|Tribuo|Uses SGD and allows any gradient optimizer|\n|Factorization Machines|Tribuo|Uses SGD and allows any gradient optimizer|\n|CART|Tribuo||\n|SVM-SGD|Tribuo|An implementation of the Pegasos algorithm|\n|Adaboost.SAMME|Tribuo|Can use any Tribuo classification trainer as the base learner|\n|Multinomial Naive Bayes|Tribuo||\n|Regularised Linear Models|LibLinear||\n|SVM|LibSVM or LibLinear|LibLinear only supports linear SVMs|\n|Gradient Boosted Decision Trees|XGBoost||\n\nTribuo also supplies a linear chain CRF for sequence classification tasks. This\nCRF is trained via SGD using any of Tribuo's gradient optimizers.\n\nTribuo has a set of information theoretic feature selection algorithms which\ncan be applied to classification tasks. Feature inputs are automatically\ndiscretised into equal width bins. At the moment this includes implementations\nof mutual information maximisation (MIM), Conditional Mutual Information\nMaximisation (CMIM), minimum Redundancy Maximum Relevancy (mRMR) and Joint\nMutual Information (JMI).\n\nTo explain classifier predictions there is an implementation of the LIME\nalgorithm. Tribuo's implementation allows the mixing of text and tabular data,\nalong with the use of any sparse model as an explainer (e.g., regression trees,\nlasso etc.), however it does not support images.\n\n### Regression\n\nTribuo's regression algorithms are multidimensional by default. Single \ndimensional implementations are wrapped in order to produce multidimensional\noutput.\n\n|Algorithm|Implementation|Notes|\n|---|---|---|\n|Linear models|Tribuo|Uses SGD and allows any gradient optimizer|\n|Factorization Machines|Tribuo|Uses SGD and allows any gradient optimizer|\n|CART|Tribuo||\n|Lasso|Tribuo|Using the LARS algorithm|\n|Elastic Net|Tribuo|Using the co-ordinate descent algorithm|\n|Regularised Linear Models|LibLinear||\n|SVM|LibSVM or LibLinear|LibLinear only supports linear SVMs|\n|Gradient Boosted Decision Trees|XGBoost||\n\n### Clustering\n\nTribuo includes infrastructure for clustering and also supplies two \nclustering algorithm implementations. We expect to implement additional\nalgorithms over time.\n\n|Algorithm|Implementation|Notes|\n|---|---|---|\n|HDBSCAN\\*|Tribuo|A density-based algorithm which discovers clusters and outliers|\n|K-Means|Tribuo|Includes both sequential and parallel backends, and the K-Means++ initialisation algorithm|\n\n### Anomaly Detection\n\nTribuo offers infrastructure for anomaly detection tasks. \nWe expect to add new implementations over time.\n\n|Algorithm|Implementation|Notes|\n|---|---|---|\n|One-class SVM|LibSVM||\n|One-class linear SVM|LibLinear||\n\n### Multi-label classification\n\nTribuo offers infrastructure for multi-label classification, along\nwith a wrapper which converts any of Tribuo's multi-class classification\nalgorithms into a multi-label classification algorithm. We expect to add \nmore multi-label specific implementations over time.\n\n|Algorithm|Implementation|Notes|\n|---|---|---|\n|Independent wrapper|Tribuo|Converts a multi-class classification algorithm into a multi-label one by producing a separate classifier for each label|\n|Classifier Chains|Tribuo|Provides classifier chains and randomized classifier chain ensembles using any of Tribuo's multi-class classification algorithms|\n|Linear models|Tribuo|Uses SGD and allows any gradient optimizer|\n|Factorization Machines|Tribuo|Uses SGD and allows any gradient optimizer|\n\n### Interfaces\n\nIn addition to our own implementations of Machine Learning algorithms, Tribuo\nalso provides a common interface to popular ML tools on the JVM. If you're\ninterested in contributing a new interface, open a GitHub Issue, and we can\ndiscuss how it would fit into Tribuo.\n\nCurrently, we have interfaces to:\n\n* [LibLinear](https://github.com/bwaldvogel/liblinear-java) - via the LibLinear-java port of the original [LibLinear](https://www.csie.ntu.edu.tw/~cjlin/liblinear/) (v2.44).\n* [LibSVM](https://www.csie.ntu.edu.tw/~cjlin/libsvm/) - using the pure Java transformed version of the C++ implementation (v3.25).\n* [ONNX Runtime](https://onnxruntime.ai) - via the Java API contributed by our group (v1.12.1).\n* [TensorFlow](https://tensorflow.org) - Using [TensorFlow Java](https://github.com/tensorflow/java) v0.4.2 (based on TensorFlow v2.7.4). This allows the training and deployment of TensorFlow models entirely in Java.\n* [XGBoost](https://xgboost.ai) - via the built in XGBoost4J API (v1.6.2).\n\n## Binaries\n\nBinaries are available on Maven Central, using groupId `org.tribuo`. To pull\nall the Java 8 compatible components of Tribuo, including the bindings for\nTensorFlow, ONNX Runtime and XGBoost (which are native libraries), use:\n\nMaven:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.tribuo\u003c/groupId\u003e\n    \u003cartifactId\u003etribuo-all\u003c/artifactId\u003e\n    \u003cversion\u003e4.3.2\u003c/version\u003e\n    \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\nor from Gradle:\n```groovy\nimplementation (\"org.tribuo:tribuo-all:4.3.2@pom\") {\n    transitive = true // for build.gradle (i.e., Groovy)\n    // isTransitive = true // for build.gradle.kts (i.e., Kotlin)\n}\n```\n\nThe `tribuo-all` dependency is a pom which depends on all the Tribuo\nsubprojects except for the model card and reproducibility projects which\nrequire Java 17.\n\nMost of Tribuo is pure Java and thus cross-platform, however some of the\ninterfaces link to libraries which use native code. Those interfaces\n(TensorFlow, ONNX Runtime and XGBoost) only run on supported platforms for the\nrespective published binaries, and Tribuo has no control over which binaries\nare supplied. If you need support for a specific platform, reach out to the\nmaintainers of those projects. As of the 4.1 release these native packages all\nprovide x86\\_64 binaries for Windows, macOS and Linux. It is also possible to\ncompile each package for macOS ARM64 (i.e., Apple Silicon), though there are no\nbinaries available on Maven Central for that platform for TensorFlow or\nXGBoost. As of the 4.3 release Tribuo now depends on a version of ONNX Runtime\nwhich includes support for macOS ARM64 and Linux aarch64 platforms.  When\ndeveloping on an ARM platform you can select the `arm` profile in Tribuo's\n`pom.xml` to disable the native library tests.\n\nIndividual jars are published for each Tribuo module. It is preferable to\ndepend only on the modules necessary for the specific project. This prevents\nyour code from unnecessarily pulling in large dependencies like TensorFlow.\n\n## Compiling from source\n\nTribuo uses [Apache Maven](https://maven.apache.org/) v3.5 or higher to build.\nTribuo is compatible with Java 8+, and we test on LTS versions of Java along\nwith the latest release. To build, simply run `mvn clean package`. All Tribuo's\ndependencies should be available on Maven Central. Please file an issue for\nbuild-related issues if you're having trouble (though do check if you're\nmissing proxy settings for Maven first, as that's a common cause of build\nfailures, and out of our control). Note if you're building using Java 16 or\nearlier the model card and reproducibility packages will be disabled.\n\n## Repository Layout\n\nDevelopment happens on the `main` branch, which has the version number of the\nnext Tribuo release with \"-SNAPSHOT\" appended to it. Tribuo major and minor\nreleases will be tagged on the `main` branch, and then have a branch named\n`vA.B.X-release-branch` (for release `vA.B.0`) branched from the tagged release\ncommit for any point releases (i.e., `vA.B.1`, `vA.B.2` etc.) following from\nthat major/minor release. Those point releases are tagged on the specific\nrelease branch e.g., `v4.0.2` is tagged on the `v4.0.X-release-branch`.\n\n## Contributing\n\nWe welcome contributions! See our [contribution guidelines](./CONTRIBUTING.md).\n\nWe have a discussion mailing list\n[tribuo-devel@oss.oracle.com](mailto:tribuo-devel@oss.oracle.com), archived\n[here](https://oss.oracle.com/pipermail/tribuo-devel/). We're investigating\ndifferent options for real time chat, check back in the future. For bug\nreports, feature requests or other issues, please file a [GitHub\nIssue](https://github.com/oracle/tribuo/issues).\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.\n\n## License\n\nTribuo is licensed under the [Apache 2.0 License](./LICENSE.txt).\n\n## Release Notes:\n\n- [v4.3.2](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-3-2-release-notes.md) - Small bug fixes, notably to protobuf serialization and trees, bumps dependencies.\n- [v4.3.1](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-3-1-release-notes.md) - Small bug fixes, notably to CART trees and Example.densify, bumps dependencies to more secure versions.\n- [v4.3.0](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-3-release-notes.md) - Model card support, feature selection for classification, protobuf serialization format, kd-tree for distance computations, speed improvements for sparse linear models. Version bumps for most dependencies, and various other small fixes and improvements.\n- [v4.2.2](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-2-2-release-notes.md) - Small bug fixes, bump TF-Java to 0.4.2, jackson to 2.13.4, protobuf-java to 3.19.6, OpenCSV to 5.7.1.\n- [v4.2.1](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-2-1-release-notes.md) - Bug fixes for KMeans' multithreading, nondeterministic iteration orders affecting ONNX export and K-Means initialization, and upgraded TF-Java to 0.4.1.\n- [v4.2.0](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-2-release-notes.md) - Added factorization machines, classifier chains, HDBSCAN. Added ONNX export and OCI Data Science integration. Added reproducibility framework. Various other small fixes and improvements, including the regression fixes from v4.1.1. Filled out the remaining javadoc, added 4 new tutorials (onnx export, multi-label classification, reproducibility, hdbscan), expanded existing tutorials.\n- [v4.1.1](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-1-1-release-notes.md) - Bug fixes for multi-output regression, multi-label evaluation, KMeans \u0026 KNN with SecurityManager, and update TF-Java 0.4.0.\n- [v4.1.0](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-1-release-notes.md) - Added TensorFlow training support, a BERT feature extractor, ExtraTrees, K-Means++, many linear model \u0026 CRF performance improvements, new tutorials on TF and document classification. Many bug fixes \u0026 documentation improvements.\n- [v4.0.2](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-0-2-release-notes.md) - Many bug fixes (CSVDataSource, JsonDataSource, RowProcessor, LibSVMTrainer, Evaluations, Regressor serialization). Improved javadoc and documentation. Added two new tutorials (columnar data and external models).\n- [v4.0.1](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-0-1-release-notes.md) - Bugfix for CSVReader to cope with blank lines, added IDXDataSource to allow loading of native MNIST format data.\n- [v4.0.0](https://github.com/oracle/tribuo/blob/main/docs/release-notes/tribuo-v4-0-release-notes.md) - Initial public release.\n- v3 - Added provenance system, the external model support and onnx integrations.\n- v2 - Expanded beyond a classification system, to support regression, clustering and multi-label classification.\n- v1 - Initial internal release. This release only supported multi-class classification.\n","funding_links":[],"categories":["人工智能"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Ftribuo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Ftribuo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Ftribuo/lists"}